Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Rollback using WAL files?


  • From: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
  • To: "M.A. Oude Kotte" <marc(at)solcon(dot)nl>
  • Cc: pgsql-general(at)postgresql(dot)org
  • Subject: Re: Rollback using WAL files?
  • Date: Fri, 26 Jan 2007 09:28:42 -0500
  • Message-id: <b42b73150701260628u46235723k92e57c30060ffc5b(at)mail(dot)gmail(dot)com>

On 1/26/07, M.A. Oude Kotte <marc(at)solcon(dot)nl> wrote:
Now I've found the WAL files in the pg_xlog directory, and started
browsing around for documentation on what I can do with those. But all I
can find is that you can use them to restore your database after a crash
or a custom backup. But I would like to do it the other way around (not
use them to restore a database, but to roll it back entirely a few
days). I have 4 WAL files, from last Tuesday to today. Can I use these
files to ROLLBACK the current database, so that it's restored to the
situation it was in on Tuesday?

probably not.  While such things are possible with WAL files, it is
only for a relatively short duration unless your server is extremely
inactive or you planned for this contingency in advance -- by setting
up a a PITR snapshot and archiving as many days WAL files back as you
would like to be able to go back in time.  I'm guessing you didn't do
this.

Next we look at standard dumps (pg_dump) and possibly logs (are you
logging statements?) to recover your data.  If those don't produce
results, and you have no other way of recovering your information,
this has officially become a learning experience :(.

merlin



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group