PDA

View Full Version : Saving my database despite HD wipe



bearnet2001
05-01-2010, 02:43 PM
I'm about to cleanly wipe my drive before installing Win7 (I'm on XP 64 right now). What do I need to do in order to be able to connect to my database again when I re-install HEM on the new install? I'm using the default postgreSQL stuff, but the password might be different. Do I just need to find the database name and password and write that down? Or something else?

fozzy71
05-02-2010, 02:28 PM
First you should manually backup any original and archived files, as well as the exported files.

FAQ - Hold'em Manager Poker Tracking Software :: Reinstalling on a new PC - Backup Tips (http://faq.holdemmanager.com/questions/372/Reinstalling+on+a+new+PC+-+Backup+Tips)


Then you could/should also do a database backup.

FAQ - Hold'em Manager Poker Tracking Software :: Backup & Restore Database (http://faq.holdemmanager.com/questions/72/Backup+%26+Restore+Database)


If you have an external drive (or a small enough DB to burn to DVD) you can save your actual \PostgreSQL\8.x\data folder. Then you can reinstall the same version of postgresql and direct it to the old \data folder that you copy back to your freshly reformatted PC.


For reinstalling SQL to the same DB, follow these steps:

1) Uninstall PostgreSQL from the Windows Control Panel.
2) If you are moving the DB to a different drive/partition, manually cut or copy the \Postgresql\8.x\data directory to it's new location.
3) run the command - start > programs > accessories > command prompt > right-click > run as administrator

net user postgres /delete
4) reboot.
5) Install the same version of PostgreSQL as your current DB using these instructions - FAQ - Hold'em Manager Poker Tracking Software :: Reinstall PostgreSQL Preserving Old Database (http://faq.holdemmanager.com/questions/71/Reinstall+PostgreSQL+Preserving+Old+Database)
6) If you have moved/installed your DB to a non-default location, please make sure to change the 'Data Directory' path during the installation.


If the above process fails, you should be able to use the .backup file and follow the restore process.


If both of those methods failed for some reason, you have all the original and exported files to reimport manually.