Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZFo6d-0005dD-Uh for pgsql-admin@arkaria.postgresql.org; Thu, 16 Jul 2015 18:42:04 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZFo6d-0005P7-FA for pgsql-admin@arkaria.postgresql.org; Thu, 16 Jul 2015 18:42:03 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZFo4z-0003YA-M7 for pgsql-admin@postgresql.org; Thu, 16 Jul 2015 18:40:23 +0000 Received: from nm1-vm2.bullet.mail.ne1.yahoo.com ([98.138.91.17]) by makus.postgresql.org with esmtps (TLS1.0:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1ZFo4v-0004Gv-7k for pgsql-admin@postgresql.org; Thu, 16 Jul 2015 18:40:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ymail.com; s=s2048; t=1437072014; bh=Jq3jSEUHydkQ1yq2sRAiK5MNWKes7DRCYowV3Ywf7zs=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:From:Subject; b=oTPQlgifesnPBwTy1SFeq6rrtvtPxGPekifuymtgHTkeeUB4ZJV3CymkpSiwj0kRkYynlrHWMUjQ1GAB0tUtm0qmeHixY9GTRvXIWeQhRnzKrcaaMQYI+HrI7NAAjI8NvNiTQsJA4YBDpbWZjilELGiel+arkHOK9RnCpMwz0AOgQ6anHlIWNVilLNpK8SWmN+p+lbTECIOFSny67EE2Rte2Bm9swwJ1JFROHN0qmK2QXS8R9V95J+dlZbmfyFnlyVUTr40UXLrWJ54cY2jhm+GnYywC0GLEhS9HSVBsxcDMpHkv1ei5Nr1QnSlOuEf53BhECerGL9Ujd1moouZe2Q== Received: from [98.138.226.180] by nm1.bullet.mail.ne1.yahoo.com with NNFMP; 16 Jul 2015 18:40:14 -0000 Received: from [98.138.89.249] by tm15.bullet.mail.ne1.yahoo.com with NNFMP; 16 Jul 2015 18:40:14 -0000 Received: from [127.0.0.1] by omp1041.mail.ne1.yahoo.com with NNFMP; 16 Jul 2015 18:40:14 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 584190.20525.bm@omp1041.mail.ne1.yahoo.com X-YMail-OSG: Z9SBiw0VM1lgdPrATYQFW.QgKsRgmkZT1wl2WKrI_LQfr5cGD738kxtKu54M4s2 Ot6dwzQqFDaraNz63svQmgUdBbDPSnjkFD8DfhxkWT2xRDqs9TuXGJHOVxbOBnlbqTh2fWl.3s8K JnH..wwBzfjrnQCPRmtZ.wOxAyo0viC4a0S4CuzFFLwTTJan0vEPxrU0.qlTsSilL6PYkHSpNBXd ONhYjN4YGGIa0HoNf1rcBTqczQ1VecGJqs.Qufc.SAW2caCryD6PKwaCAzMJGY0TRdF75foQqCCs 31LLvguL_BI0DyERaJqH_Ky9Pf4X23bHcpOjpd3Y8NIfkArQAUocMYgtvOXdbKrOctgJVsXehQz_ yhRj4kvqRQLvhRG6Rg6vDXVj7gk4l2Dgzm.0JFZsb2IgjHRCm5SvSPmBw4GlzQk5QvnYPX5HVvvW G8j6eM8lYoSteRfJU8IcthffIuYrQT7kFcq6PebFba2tN0OwTSTVRymv1gAYfWHOgCPlQDGI.vi2 Djlf2pGPi4_A9HAdGHI5C9.hg6MZ2QU8- Received: by 98.138.105.245; Thu, 16 Jul 2015 18:40:14 +0000 Date: Thu, 16 Jul 2015 18:39:34 +0000 (UTC) From: Kevin Grittner Reply-To: Kevin Grittner To: Guillaume Lelarge , Matthieu Lejeune Cc: Keith , "pgsql-admin@postgresql.org" Message-ID: <715399565.355625.1437071974784.JavaMail.yahoo@mail.yahoo.com> In-Reply-To: References: Subject: Re: Automatic restore corruption problem MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Length: 1599 X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org Guillaume Lelarge wrote: > There were two issues on your script: it removed the backup_label > file and didn't create the recovery.conf file. There were more flaws in the script than that. See: http://www.postgresql.org/docs/current/static/continuous-archiving.html#BACKUP-PITR-RECOVERY That says, in part: | Remove any files present in pg_xlog/; these came from the file | system backup and are therefore probably obsolete rather than | current. The point is, if you are unfortunate enough to have recovery use one of the WAL files copied during the backup, it might not be complete, since they may have been copied at any point in the backup -- quite likely before all the WAL records needed for reaching consistency were added. The archived WAL files will be complete; set up the recovery.conf file to use them. Elsewhere on that page it says: | You might also want to exclude postmaster.pid and | postmaster.opts, which record information about the running | postmaster, not about the postmaster which will eventually use | this backup. (These files can confuse pg_ctl.) If these files are removed, it is much harder to accidentally bring up the database with corruption. > Did you fix this? if yes, can you send back your script? Thanks. Yeah, if you think you are now following the instructions shown at the link I show above and are still having problems, please show all steps in the process -- copy and paste scripts and commands, and the relevant portions of logs. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin