PDA

View Full Version : Backed up PostgreSQL, how to reinstall?



cpar1
04-14-2009, 05:47 PM
HI, from my previous computer, I dragged the entire PostgreSQL folder to my external hardrive (5gb of files). Now I have a new laptop and want to use the same database that is now on the external hard drive. How do I move PostgreSQL from my external to my new laptop so I can use the old database? Do I download HEM first or after?

Is there a way I can just drag 1 folder that contains all the data for the hands?

morny
04-14-2009, 06:39 PM
This isnt the best way to do this, some of the time it wont work, you should have exported the hands then installed PostgreSQL and imported, however you can give it a go and see if it works:

if you have installed postgresql again then turn off the service by finding PostgreSQL in the Start Menu and using the Stop Service option. Then delete the \Data folder in the new installation of postgres and copy your backed up \Data folder over. if you can't delete then you may need to reboot.

Then in the PostgreSQL menu click on Start Service and if everything went right you should be able to connect to your old database.

slaman
04-14-2009, 06:50 PM
morny - do you have any idea on how I can enable a windows screensaver password for the postgres user profile?

cpar1
04-14-2009, 07:58 PM
Morny I did as you said and it worked! Thanks!

LanceFire
04-16-2009, 02:58 PM
Why do you recommend reimporting all hands rather than doing a backup/restore? Backup/restore seems to be quick the one time I did it.

morny
04-16-2009, 07:19 PM
morny - do you have any idea on how I can enable a windows screensaver password for the postgres user profile?

No, try asking the people tha wrote the screensaver software or check the postgreSQL forums


Why do you recommend reimporting all hands rather than doing a backup/restore? Backup/restore seems to be quick the one time I did it.

Yeah it is quicker and you can do that option if you want, the problem is sometimes it dosent work and people end up deleting the database and losing their hands so its longer but safer