Re: Recover lost database from DATA folder - Mailing list pgsql-general

From Richard Huxton
Subject Re: Recover lost database from DATA folder
Date
Msg-id 44D39042.8000906@archonet.com
Whole thread Raw
In response to Recover lost database from DATA folder  ("Rohit Prakash Khare" <rohitprakash123@indiatimes.com>)
List pgsql-general
Rohit Prakash Khare wrote:
> I created few tables in one of my PostgreSQL database, but because of some connection
> problems I uninstalled it.  have a DATA folder of my previous PostgreSQL installation. I want to use this directory
ona new computer where I have presently installed PostgreSQL.  
>
> I am using PostgreSQL 8.1 and pgAdminIII 1.4.3 on Windows XP. I want that the database in my previous DATA file
shouldget attached to the new pg AdminIII. I have not got any backup of the database, but only the DATA folder is left. 
>
> Is there any way?

If you have *all* the required files:
1. Stop PostgreSQL
2. Replace the existing data directory with your backup
3. Make sure the owner/permissions are correct.
4. Start PostgreSQL
5. Check the logs

This assumes your data directory was backed up while PostgreSQL was
stopped, otherwise there will probably be problems.

--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: Scheduling Automatic Backups
Next
From: Tom Lane
Date:
Subject: Re: pg_xlog not cleaned up