PDA

View Full Version : Problem with backing up



SharpObject
06-04-2009, 11:46 PM
I am trying to back up a database from a old postgres database. My computer failed due to a hard disk problem. I was able to use a shell to transfer my HD to another friend's desktop to check and see if my files were there. They are but I don't know how to locate/transfer/copy my postgres databases. My friend has postgres and HEM already on his computer. :confused:

morny
06-05-2009, 12:09 PM
This usually dosent work, 1 because this is not the correct way to backup databases and 2 i think because the permissions will be related to the old usernames on the old PC so that usually causes problems too, if you do it on the same PC you usually dont have any problems but i wouldnt be so hopeful in this case, nonetheless ill give you the instructions:


Copy the files from the following folder X:\Program Files\PostgreSQL\PostgreSQL8.3\Data.

Then reinstall PostgreSQL 8.3 to the same location on the new drive, stop the postgerSQL service by going to Start > All Programs > PostgreSQL > Stop Service then go to X:\Program Files\PostgreSQL\PostgreSQL8.3\Data and delete the contents on the new drive and copy the data folder contents from the old drive to this location. The restart the PostgreSQL service Start > All Programs > PostgreSQL > Start Service and if all goes well it will connect without errors and if not you can try having a look at the security permissions and see if that helps but like i mentioned it its unlikely to work from what ive seen.