Exactly,
in our environment, we have a full backup of directory PGDATA and every 15 minutes we do archival backup where there are archival file.
So we can restore in a specific time. Before the archival backup we forced switch wal file to generate archival file so we don't lost any transaction.
Emanuele
Il giorno ven 18 ott 2019 alle ore 10:12 Luca Ferrari <fluca1978@xxxxxxxxx> ha scritto:
On Fri, Oct 18, 2019 at 7:59 AM Daulat Ram <Daulat.Ram@xxxxxxxxxxxxxxx> wrote:
> Can you please share some ideas and scenarios how we can do the PITR in case of disaster.
In order to be able to do PITR you need:
- a base backup of your database
- WALs from the backup going on
See <https://www.postgresql.org/docs/12/continuous-archiving.html>.
Then, to keep it simple, if the disaster happens in the time window
between the backup and the last WAL archiving, you can restore an
instance at any point in time previously the disaster itself.
Luca