Re: Automatic restore corruption problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Guillaume Lelarge <guillaume@xxxxxxxxxxxx> 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@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux