Re: Would it be possible - Mailing list pgsql-general

From Christian Ullrich
Subject Re: Would it be possible
Date
Msg-id 4E2D10EC.3050009@chrullrich.net
Whole thread Raw
In response to Would it be possible  (Adarsh Sharma <adarsh.sharma@orkash.com>)
List pgsql-general
* Adarsh Sharma wrote:

> In the evening, by mistake I issued a *drop database globedatabase* command.

> Is it possible to get the data back till the state before drop database
> command.
>
> My pglog files is in the E:/data directory & Binary log is also enabled.

You do not mention that you have a file-system level backup from before
the DROP DATABASE. Assuming you do not have one, then no, it is not
possible. You cannot restore WAL to a cluster that is not in the same
state it was in when that WAL was generated.

If you have the fs-level backup (the kind of backup you need to use
pg_start_backup()/pg_stop_backup() to create), as well as all WAL
segments from before the time of that backup until the moment you want
to go back to, then you can do it (but only for the entire cluster, so
you might need to install Postgres somewhere else just for recovery).
Look in the manual under "Point In Time Recovery" (PITR).

--
Christian

pgsql-general by date:

Previous
From: Adarsh Sharma
Date:
Subject: Would it be possible
Next
From: Sim Zacks
Date:
Subject: Re: Implementing "thick"/"fat" databases