Search Postgresql Archives

RE: How to restore database to previous state

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

 



Hi,

Have you looked at the recovery parameter as below ?

recovery_target_time

Using this, you could achieve a PITR of the current database. If the recovery requires WAL that does not exist on disk then you may have to restore it from previous night's backup.

Please have a look at the docs for other such recovery parameters: https://www.postgresql.org/docs/12/runtime-config-wal.html


Regards,
Nawaz

-----Original Message-----
From: Andrus <kobruleht2@xxxxxx>
Sent: Monday, 11 May 2020 7:43 AM
To: pgsql-general <pgsql-general@xxxxxxxxxxxxxx>
Subject: How to restore database to previous state

Hi!

Postgres 12 database is runing on Debian

max_wal_size = 5GB

is specified in postgres.conf  file

How to restore database to some previous state, e.q. before important data was accidently deleted.

Binary asynchrunous replication with slot is also used.

I looks like it is possible to create standby server which replicates changes using 24 hour delay and data directory backups in every night.
However this requires separate delayed standby server .
Is there simpler solution, e.q reverse playback of wal segments starting from current data directory contents.

Andrus.




IMPORTANT NOTE: Fuji Xerox email transmission, including any attachments, is private and confidential and may contain legally privileged information. It is for the addressee's attention only. If you are not the intended recipient and have received this transmission, you must not use, edit, print, copy or disclose its contents to any person or disseminate the information contained herein or hereto attached, and you must notify sender immediately by return email and delete this transmission from your system. Any confidentiality, privilege or copyright is not waived or lost because this e-mail has been sent to you in error. We have used reasonable efforts to protect this transmission from computer viruses and other malicious software, but no warranty is made and the sender takes no responsibility for any loss or damage incurred from using this email or the information contained in this email.






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux