PDA

View Full Version : Moving database (postgres question)



Dzsenaj
05-20-2009, 10:20 AM
Hi,
how can I move my whole database from the system drive to another?
It's 5Gb and I don't really want to reimport the hands...
Thanks

Dzsenaj
05-20-2009, 10:37 AM
Ehh, wrong topic, please someone move it where it belongs to. I can't delete it.

morny
05-20-2009, 01:25 PM
Youll need to reimport them if you want to move it, there is another method where you just copy and paste the folder but it dosent always work and youll need to export the hands first if you use that option in case it wont reconnect

I recommend to export the hands first http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=173

Then backup the database http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=12

See this FAQ about other things you might want to backup http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=101

Then uninstall PostgreSQL, reinstall it on the new drive and follow the instructions for restoring the backup. If youve any issues restoring the database you can just create a new database
http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=146 and reimport the exported hands into it


If you do want to try the copy and paste method heres the instructions:

Export the hands on the old drive
http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=173

Uninstall PostgreSQL 8.3 and it will leave the following folder X:\Program Files\PostgreSQL\PostgreSQL8.3\Data you need to copy all the files from that Data folder.

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 youll need to use the first method i described above.