Search Postgresql Archives

Re: Am I missing something about the output of pg_stop_backup()?

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

 



Ben wrote:
So, I'm working on a script that does PITR and basing it off the one here:

http://archives.postgresql.org/pgsql-admin/2006-03/msg00337.php

(BTW, thanks for posting that, Rajesh.)

My frustration comes from the output format of pg_stop_backup(). Specifically, it outputs a string like this:

550/E788D70

...which I then need to tokenize in order to find which archived wal files I'll need to keep as part of the backup. For instance, that output above will result in a WAL file named like so:

00000001000005500000000E.00788D70.backup

4. Actually.... why doesn't pg_stop_backup() just output the WAL filename that was used?

Have you looked in the "backup history file":
http://www.postgresql.org/docs/8.2/static/continuous-archiving.html#BACKUP-BASE-BACKUP

"The backup history file is just a small text file. It contains the label string you gave to pg_start_backup, as well as the starting and ending times and WAL segments of the backup. If you used the label to identify where the associated dump file is kept, then the archived history file is enough to tell you which dump file to restore, should you need to do so."

--
  Richard Huxton
  Archonet Ltd


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux