on-line backup questions

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

 



I've been working on backup restore scripts for a PostgreSQL DB hosted on an Amazon EC2 instance. EC2 instances don't have any persistent storage, so I archive the WAL files to Amazon S3. I do periodic backups, and restore and roll forward when an instance is restarted.

I've followed the excellent documentation at http://www.postgresql.org/docs/8.0/interactive/backup-online.html , and everything is working well, but I have a few further questions.

1. Purely out of curiousity, what's the nnnnnnnn.history file which is requested from the archive when you restore? I realise that the restore process looking for files which don't exist is not a problem, I'm just being inquisitive.

2. When I do a backup, Postgres requests archiving of n.m.backup and the WAL file n immediately, so I only copy WAL files with numbers > n from pg_xlog. I've seen suggestions that I should be copying WAL files with numbers >= n -- is there any reason to do so?

3. What's the best thing to do when I deliberately shut down PostgreSQL (i.e. pg_ctl stop)? When I start again I will be restoring from the most recent backup and rolling forward over the archived WAL files. I believe that shutdown leaves me with unarchived WAL files in pg_xlog. Can I simply copy these to S3 as if they were WAL files which were copied from pg_xlog at the time of the last backup, and then put them back into pg_xlog as part of my restore process?

4. I'm using PostgreSQL 8.0 -- are there any significant improvements in on-line backups in later versions?

Thanks,
  Tom

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

[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