Search Postgresql Archives

Re: PITR and base + full backups

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

 



On Tue, 16 Sep 2008, Joey K. wrote:

(1) pg_start_backup(`date`)
(2) perform hot rsync first (while the database is running)
$ rsync -avr pgdata /backup/`date`/
(3) stop pg

You need to call pg_stop_backup() here and wait until the last WAL file it references has been archived before this backup is complete. You can't finish that backup with pg_stop_backup after the server has been stopped. The upcoming PostgreSQL 8.4 won't even let you stop the server normally if a backup is in process because you're not supposed to do that.

If you're running 8.2 or later, you can set archive_timeout to bound how long it will take before that last segment shows up, or you can manually call pg_switch_xlog. See http://wiki.postgresql.org/wiki/Warm_Standby for how to force that on 8.1 (and the walkthrough on that page may be helpful to you as well).

--
* Greg Smith gsmith@xxxxxxxxxxxxx http://www.gregsmith.com Baltimore, MD


[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