PDA

View Full Version : lost databases after posgresql update in windows 10



mehwtf
08-08-2016, 10:32 AM
Hi!
i just installed the newest posgres version and uninstalled the old one on windows 10 after i had issues with getting hm2 to connect to postgres. now it works but all my databases are not showing up in hm2 anymore..
I guess postgres uninstaller doesnt delete any database content when uninstalling.
Is there a way to restore thos databases somehow?
thanks in advance!

udbrky
08-08-2016, 10:20 PM
Hello,

This is because it's using a different data directory.

Please note that reinstalling PostgreSQL will mean losing all your old data. If you have access to HM2 and your database was not corrupt then please follow these instructions for backing up your database as a precaution in case you cannot reconnect after reinstalling PostgreSQL - Hold'Em Manager 2 FAQs - Poker Software :: How does Backup and Restore Database, Settings and HUD configs work? (http://hm2faq.holdemmanager.com/questions/1471/How+does+Backup+and+Restore+Database%2C+Settings+a nd+HUD+configs+work%3F)

If you cannot access the database in HM2 then you can backup your database using this method: Hold'Em Manager 2 FAQs - Poker Software :: How does Backup or Restore via PostgreSQL work? (Advanced Method) (http://hm2faq.holdemmanager.com/questions/952/How+does+Backup+or+Restore+via+PostgreSQL+work%3F+ %28Advanced+Method%29) but if your database was corrupt then the best solution is to reimport all your hands from C:/HM2archive folder or if your pokersite supports it you can request all your hands and summaries and reimport them as restoring a corrupt database will just restore all the problems you had.

Once you have backed up your previous database(s) then follow the instructions below to uninstall and reinstall PostgreSQL using the same database.

1) Uninstall PostgreSQL from the Windows Control Panel.

2) Run the command - start > programs > accessories > command prompt > right-click > run as administrator and type the following and then press enter:

net user postgres /delete

3) You should get a successfully completed response if done correctly. If you get a permission type error you likely didnt run it as administrator as explained above.

4) Reboot your PC

5) Install the same version of PostgreSQL as your previous database using these instructions - Hold'Em Manager 2 FAQs - Poker Software :: Reinstall PostgreSQL 8.4 while preserving database (http://hm2faq.holdemmanager.com/questions/1591/Reinstall+PostgreSQL+8.4+while+preserving+database )
http://www.holdemmanager.com/downloads/postgres84

You can also import hands from c:\hm2archive.