Sv: Postgres Point in time Recovery (PITR),

From: Andreas Joseph Krogh <andreas(at)visena(dot)com>
To: Daulat Ram <Daulat(dot)Ram(at)exponential(dot)com>
Cc: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Sv: Postgres Point in time Recovery (PITR),
Date: 2019-10-18 08:29:45
Message-ID: VisenaEmail.8c.74d96bc312aea0bc.16dddf72933@tc7-visena
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


På fredag 18. oktober 2019 kl. 07:59:21, skrev Daulat Ram <
Daulat(dot)Ram(at)exponential(dot)com <mailto:Daulat(dot)Ram(at)exponential(dot)com>>:

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/ <https://www.pgbarman.org/index.html>
) 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(at)192(dot)168(dot)0(dot)184 <mailto:andreak(at)192(dot)168(dot)0(dot)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
andreas(at)visena(dot)com <mailto:andreas(at)visena(dot)com>
www.visena.com <https://www.visena.com>
<https://www.visena.com>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ekaterina Amez 2019-10-18 08:59:18 Re: Sv: Conflict between autovacuum and backup restoration
Previous Message Emanuele Musella 2019-10-18 08:20:15 Re: Postgres Point in time Recovery (PITR),