If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > PostgreSQL > Database wiped out... How do I replay it from WAL?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-03-11, 07:42
dumbom dumbom is offline
Registered User
 
Join Date: Aug 2011
Posts: 3
Unhappy Database wiped out... How do I replay it from WAL?

Please be kind to a newcomer...

Somehow I managed to wipe out an entire database. I was working with Doctrine and altered just one table. Don't ask me what happened next. Now I'm sitting here with a backup that's 2 months old and some unhappy people.

It seems to be possible to replay everything from WAL but we have no archived data, except two big files in the "pg_xlog" directory. Today I installed "skytools" and read about "walmgr". It may be capable but first some advice please?
Reply With Quote
  #2 (permalink)  
Old 08-03-11, 19:28
someidiot someidiot is offline
Registered User
 
Join Date: Mar 2011
Posts: 27
Quote:
Originally Posted by dumbom View Post
Please be kind to a newcomer...

Somehow I managed to wipe out an entire database. I was working with Doctrine and altered just one table. Don't ask me what happened next. Now I'm sitting here with a backup that's 2 months old and some unhappy people.

It seems to be possible to replay everything from WAL but we have no archived data, except two big files in the "pg_xlog" directory. Today I installed "skytools" and read about "walmgr". It may be capable but first some advice please?
The logs in the pg_xlog directory can only be applied to a previous backup. If you most recent backup is 2 months old you need every log file created since then, which seems very unlikely.
Reply With Quote
  #3 (permalink)  
Old 08-04-11, 15:29
dumbom dumbom is offline
Registered User
 
Join Date: Aug 2011
Posts: 3
Thanks for your answer. I suspected that we won't be able to recover the data. It's time to face the consequences and make sure it doesn't happen again!
Reply With Quote
  #4 (permalink)  
Old 08-04-11, 16:59
robgrdhvn robgrdhvn is offline
Registered User
 
Join Date: Jan 2011
Location: Grand Haven / Royal Oak Michigan USA
Posts: 23
Don't Give Up

Are you looking at files on a server or are these local files? It seems to me you should be capable to perform a file restore to get you back to where you need to be.
Reply With Quote
  #5 (permalink)  
Old 08-05-11, 17:50
dumbom dumbom is offline
Registered User
 
Join Date: Aug 2011
Posts: 3
The files are on a server, but I also have a local copy of them. I'm running a local web server for testing purposes, with PostgreSQL and phpPgAdmin installed. All the data seems to be stuffed in pg_xlog but retrieving it is a real challenge! After almost having a nervous breakdown I managed to collect some data and got the database in working order at least. Now when the panic is gone we can discuss the issue in a calm fashion
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On