Thread: PostgreSQL FAQ
View Single Post
  #15 (permalink)  
Old 10-11-10, 14:53
loquin loquin is offline
Super Moderator
 
Join Date: Jun 2004
Location: Arizona, USA
Posts: 1,797
I uninstalled Postgres but DON'T have a current backup! How do I recover?



With thanks to shammat, for his step-by-step directions, originally posted here.
  1. Make a backup of your current data directory
  2. Make sure you have a backup of your data directory
  3. Install Postgres vx.x again, overwriting the current data directory (did you make sure you have a backup?)
  4. Shut down the Postgres service
  5. Make sure the Postgres service has stopped
  6. Check that Postgres is not running
  7. Copy the backup of your data directory to the original location (make sure Postgres is not running when you do that)
  8. Start the postgres service again
Now, you should have a working Postgres server, with data restored and current, as of the point in time that you uninstalled Postgres without a backup.
__________________
Lou
使大吃一惊
"Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
"I have my standards. They may be low, but I have them!" - Bette Middler
"It's a book about a Spanish guy named Manual. You should read it." - Dilbert


Last edited by loquin; 10-11-10 at 14:56.