Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lY6vt-0005oy-GE for pgsql-admin@arkaria.postgresql.org; Sun, 18 Apr 2021 12:53:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lY6vs-0002IW-DW for pgsql-admin@arkaria.postgresql.org; Sun, 18 Apr 2021 12:53:48 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lY6vs-0002IP-2v for pgsql-admin@lists.postgresql.org; Sun, 18 Apr 2021 12:53:48 +0000 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lY6vl-0000Wl-GO for pgsql-admin@lists.postgresql.org; Sun, 18 Apr 2021 12:53:46 +0000 Received: by mail-pf1-x429.google.com with SMTP id 10so12509944pfl.1 for ; Sun, 18 Apr 2021 05:53:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=05K60j53lXuE1rfpNF2jI9wd88E8BbVj4zsLN0xnI/g=; b=PydRnn/geVsfYb/fzWV43QT4ICmP32WlXBBEO3nEPmKk+4s7zmWg6FZkIGmIEPZYnm dOm9w2oeHDVY4YgJvIJdL4Ql9Hn3ZcfWuWMPdieUbdSmjp3xncJ8N15tFYjgCXRCq5H+ POsQrYTTbt/w2kIoOYuaNGdzGAYtaAzBLvH8OlM/qcAJR1OBO8o/0e3uDNhslxADa5Ew MncwAk0CMMWsVV9gseVwFj3KEaRuNIKsEgwmlChH3sa1akixynGhPd8hNoqF+HFQq3D9 FDur6OHJa6KC3eHLT8rIOSUzpgKjkfRNNbuf0mWaSJ0D2Yg5hCvisJQGhNiJ6jTXhhYk xeQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=05K60j53lXuE1rfpNF2jI9wd88E8BbVj4zsLN0xnI/g=; b=BvgUlpbFzbf10Nn/91Q5i/EqJsuDLel8MmmFZPYEJwTBq+y9qxF8vBSZfqpDI58KKp 73zeX2KuKWkqsquLUzvFIv+fP+H4KDLlpVB69X5+Q7JmovsSHP2J3vJZwvvvu1XNPvdW sBKxj93DprXsZ+5Ttc4HwtFhUcN93I8werVpuTJF6dlkSWGYWJWcIpO3k84p9FSEbkpT Pn0i+kz+QM40reEOv8Jny839Wv4WMjMQHk2mOzBcz6w3ktalgLayezf97I23ZnmrtnB0 ZWTIREtBMWGWMuyMxRaMCMYlCCzkER0Lpy1vQ0K5nFS6jYHNZrmARNnBiuvKzwy/4nre cx0g== X-Gm-Message-State: AOAM532VHnr3CfLTU46byKO8oWlfVbU8mn/+7GP4b394FGyTyAtSpk7J seRu/rnOhX8a0GI8P8dXibQ= X-Google-Smtp-Source: ABdhPJz38aiEnhUQoNeK/QzyEgjzu3K1QBUhrnuCD+kFV+/VTWj5oi0fhbvJpTrzpJwz90+7aMD2eg== X-Received: by 2002:a63:3245:: with SMTP id y66mr7422666pgy.435.1618750420104; Sun, 18 Apr 2021 05:53:40 -0700 (PDT) Received: from nol (2001-b011-0008-1667-135d-d41f-c0b9-f708.dynamic-ip6.hinet.net. [2001:b011:8:1667:135d:d41f:c0b9:f708]) by smtp.gmail.com with ESMTPSA id z195sm10296222pfc.146.2021.04.18.05.53.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Apr 2021 05:53:39 -0700 (PDT) Date: Sun, 18 Apr 2021 20:54:01 +0800 From: Julien Rouhaud To: Yambu Cc: Pgsql-admin Subject: Re: Recovered data directory Message-ID: <20210418125401.licfzimvoor25gdn@nol> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sun, Apr 18, 2021 at 02:44:03PM +0200, Yambu wrote: > Hello > > I lost data when my server crashed, so i have rebuilt a new server and have > recovered the directory /var/lib/pgsql/10/data is there anything i need to > do to start a new postgres instance after having copied the old recovered > /var/lib/pgsql/10/data to new data directory with the same path You also need all tablespaces directory if you had any, and possibly the pg_wal directory if it was a symlink. Note that if you get any error when trying to start the server it would actually be useful to mention them.