From: Andreas Joseph Krogh <andreas@visena.com>
To: Daulat Ram <Daulat.Ram@exponential.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Sv: Postgres Point in time Recovery (PITR),
Date: Fri, 18 Oct 2019 10:29:45 +0200 (CEST)
Message-ID: <VisenaEmail.8c.74d96bc312aea0bc.16dddf72933@tc7-visena> (raw)
In-Reply-To: <MN2PR01MB5854BEF9884EA942657A18799B6C0@MN2PR01MB5854.prod.exchangelabs.com>
På fredag 18. oktober 2019 kl. 07:59:21, skrev Daulat Ram <
Daulat.Ram@exponential.com <mailto:Daulat.Ram@exponential.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@192.168.0.184 <mailto: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
andreas@visena.com <mailto:andreas@visena.com>
www.visena.com <https://www.visena.com;
<https://www.visena.com;
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: andreas@visena.com, Daulat.Ram@exponential.com
Subject: Re: Postgres Point in time Recovery (PITR),
In-Reply-To: <VisenaEmail.8c.74d96bc312aea0bc.16dddf72933@tc7-visena>
References: <MN2PR01MB5854BEF9884EA942657A18799B6C0@MN2PR01MB5854.prod.exchangelabs.com> <VisenaEmail.8c.74d96bc312aea0bc.16dddf72933@tc7-visena>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox