Untraditional point in time recovery.

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

 



Hi List.

I have somehow, come up with a postgresql left in this state..

The database crashed today, needing to do a point in time restore that
should stop today before 10:30. I do have wal-files from today - 7 days available
and I have a scheduled base backup that runs:

pg_start_backup before and pg_stop backup after, once a week. The
last one being -2 days old and the former being -9 days old.

When inspecting the backup I can see that the former backup had
failed to run "pg_stop_backup" so, the pg_start_backup command
of the -2 base backup has failed.

Can I instruct to postgresql to start from the -2 days base backup and
go back to the last "checkpoint" prior to the backup start form the
transaction logs and apply log from that point up until today?

Normally I would just start by the -9 base and apply wal-log from there, but
I am missing a days worth log-file to do that.

So the situation is:
pg_start_backup was run 9 days ago
pg-dirs was copied 2 days ago
pg_stop_backup was run 2 days ago.
I have now-7days worth of archived logs.

It should be safe to just apply "wal-log" from any state prior to -2 days ago? Can somehow instruct pg to do just that? And reach consistent state after that.

Should I manually craft a backup_label file?

thanks.


Jesper .. and yes, I'll make sure that the exitstatus from pg_start_backup gets propagated
correctly back from now on..

--
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