PDA

View Full Version : How to move postgresql database to a different hdd ?



Romeo83
12-01-2010, 05:17 AM
My current hdd is filling up and I want to move my database to a new drive.
Can this be done ? if yes then how ?

Veteran68
12-01-2010, 10:34 PM
There are several approaches you can take. The easiest/cleanest is to export all of your hands from HEM. Completely uninstall PostgreSQL (making sure to also remove the postgres user account), then reinstall to the new HDD. Create a new HEM database and reimport your exported hands.

The other option is to backup/restore the entire database using pgAdmin or the new HEM Backup/Restore tool (in the File menu). You still have to do the PostgreSQL uninstall/reinstall procedure. I haven't tried the HEM tool yet, but I've done the pgAdmin backup/restore a few times. It can be a bit ugly and *extremely* slow, and usually throws some errors, but the database seemed fine afterward. That's why I say the cleanest way is probably to export all hands and reimport. That way you're also sure to pickup any new calculations if you've been running HEM a long time and your database is really old.