Re: Postgres Dropped DB have recovered files how to restore

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: lifetronics <lifetronics(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Postgres Dropped DB have recovered files how to restore
Date: 2016-06-06 23:09:29
Message-ID: 20160606230929.GA435080@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

lifetronics wrote:
> This morning I accidently deleted my database for my OpenERP accounting. I
> did not have a good backup system setup so I was unable to do a system
> restore. i did manage to recover the files the drop command removed but I
> dont know how to get the DB back into postgres? Can anyone help me with
> this. I realy need this db to be restored otherwise I am screwed.

I have no idea about Windows filesystems but you may be able to
"undelete" the files, as long as you don't touch the partition for
anything else; search the web for "undelete ntfs". Once you undelete
you will need to put them back in the right places. I suggest you get a
disk with twice as much space as the original; make an image copy of the
original disk and don't touch the original anymore. Then try to
undelete the files from the image. Use the list Adrian provided as a
guide for what you're missing.

You *may* be able to recover the data, if you're lucky and careful.

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Patrick B 2016-06-07 00:11:56 Re-sync slave server
Previous Message Dave Cramer 2016-06-06 22:18:22 Re: Postgres Dropped DB have recovered files how to restore