Re: Automatic restore corruption problem - Mailing list pgsql-admin

From Kevin Grittner
Subject Re: Automatic restore corruption problem
Date
Msg-id 715399565.355625.1437071974784.JavaMail.yahoo@mail.yahoo.com
Whole thread Raw
In response to Re: Automatic restore corruption problem  (Guillaume Lelarge <guillaume@lelarge.info>)
List pgsql-admin
Guillaume Lelarge <guillaume@lelarge.info> 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

pgsql-admin by date:

Previous
From: "Gilberto Castillo"
Date:
Subject: Re: [E-MASIVO][E-MASIVO]postgres_fdw user mapping and role inheritance
Next
From: Natalie Wenz
Date:
Subject: Re: postgres_fdw user mapping and role inheritance