Hello All,
Can you please share some ideas and scenarios how we can do the PITR in case of disaster.
We use barman (
https://www.pgbarman.org/) for continuous streaming backup and I had to restore from it once, and it went like this:
======================8<===================
$ barman recover --target-time "2018-12-06 12:20:00" --remote-ssh-command "ssh andreak@192.168.0.184" db01_11 20181130T190002 "/home/andreak/barman-restore"
Processing xlog segments from streaming for db01_11
00000001000001740000002E
00000001000001740000002F
000000010000017400000030
Starting remote restore for server db01_11 using backup 20181130T190002
Destination directory: /home/andreak/barman-restore
Doing PITR. Recovery target time: '2018-12-06 12:20:00+01:00'
17445, dbname1, /storage/fast_ssd/11/tablespaces/dbname1 29218, dbname2, /storage/fast_ssd/11/tablespaces/dbname2 ...
29235503, dbnameX, /storage/fast_ssd/11/tablespaces/dbnameX
Copying the base backup.
Copying required WAL segments.
Generating recovery.conf
Identify dangerous settings in destination directory.
WARNING
The following configuration files have not been saved during backup, hence they have not been restored.
You need to manually restore them in order to start the recovered PostgreSQL instance:
postgresql.conf
pg_hba.conf
pg_ident.conf
Recovery completed (start time: 2018-12-06 13:14:53.220043, elapsed time: 4 hours, 52 minutes, 47 seconds)
Your PostgreSQL server has been successfully prepared for recovery!
======================8<===================
--
Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963