Videos / Other Resources

No attachments were found.

How does Backup or Restore via PostgreSQL work? (Advanced Method)

Question:
How does Backup or Restore via PostrgeSQL work for HM2? (Advanced Method) 

Holdem Manager makes it simple to do a backup and restore via the Database Manager. The guide below is only for advanced users or people who cannot successfully create a backup with the Database Manager. 

 

Note: This FAQ is intended for Advanced PC Users Only!!!

 

Note:  Before backing up or restoring a Database, export hands first as a safeguard! This way there is always a backup.

 

Note:  To increase the chance of this working, make sure to install the same version of PostgreSQL that housed the old database.

 

Note:  Never restore a DB .backup file, that was created with PGAdmin, into a new DB that was created by the Holdem Manager Database Control Panel.  If it was backed up with PGAdmin, it must be restored with PGAdmin.


Backup Database

Restore Database


Backup Database
  1. In the desktop, navigate to Start > All Programs > PostgreSQL 8.x > pgAdmin III.

  2. Or, navigate to C:\Program Files\PostgreSQL\8.x\bin\ and click on the elephant icon called pgAdmin3.exe.


The pgAdmin III screen should pop up. 

 

 

postgresql-backup-01.jpg

 

2.  Double click on PostgreSQL Database Server 8.x in the object browser field.

3.  Enter the password if prompted. This is the password that was used when setting up PostgreSQL. Upon successful authentication, the properties tab will populate as shown in the screenshot below:

postgresql-backup-02.jpg

4.  Expand the Databases folder and select the applicable database (HoldemManager by default).

Note: A window may pop-up about database encoding. If so, click on don't show this tip again and click on OK.

5.  Right click on the selected database and choose Backup. A Backup Database dialog will pop up.

 

postgresql-backup-03.jpg

 


6.  In the Filename field, click on the ellipsis button and choose a name and location where is will save to.

Note: Click on Browse Folders to select a location.


7.  Click on OK.

Note: Leave all the default settings as they are. Remember the location. This is where it will be restored from.

The selected database will now begin backing up. While it is backing up, it may become unresponsive. It is finished when the OK button, which is grayed out during backing up, changes to Done.

 

8. Click Done.

9.  Copy and save the Database folder to the pgAdmin Backup. The folder is located here:

Windows 7: C:\Users\username\AppData\Roaming\HoldemManager\
Windows XP: C:\Documents and Settings\User_name\Application Data\HoldemManager\

You must show both hidden files and check unhide system files.

 


The selected database has now been backed up.



 


Restoring Your Database

Note: Its extremely important to only restore a database to a blank database created via the method below. It also must be a completely empty database. Trying to restore to an old database or a database created via Holdem Manager will corrupt the old database and cause duplication of hands.

To restore a database, do the following

  1. In the desktop, navigate to Start > All Programs > PostgreSQL 8.x > pgAdmin III.
  2. Or, navigate to C:\Program Files\PostgreSQL\8.x\bin\ and clicking on the elephant icon called pgAdmin3.exe.

The pgAdmin III screen should pop up.

 

postgresql-backup-04.jpg

2.  Double click on PostgreSQL Database Server 8.x in the object browser field.

3.  Enter the password if prompted. This is the password that was used when setting up PostgreSQL. Upon successful authentication, the properties will populate as shown in the screenshot below:

 

postgresql-backup-05.jpg

4.  In pgAdmin, click on Edit >  New Object > New Database. A New Database dialog will pop up.

 

utf8.png

 

5.  In the Properties tab, enter a new name and leave everything else as default. Click OK

6.  In pgAdmin III, xpand the Databases folder and select the new database, right click and select restore. A Restore Database dialog will pop up.

 

postgresql-backup-07.jpg

7.  In the Filename field, click on the ... button and go to the location where the backup file is located and click Open.

8.  Leave all the default settings as is and click OK.

9.  The restoring process might end with an error, only click cancel and do not click Ok to restore again.

10. Finally, move the Database folder that was saved in Backup step# 9 into:

Windows 7: C:\Users\username\AppData\Roaming\HoldemManager\
Windows XP: C:\Documents and Settings\User_name\Application Data\HoldemManager 
You must show both hidden files and check unhide system files.

 

Please delete everything EXCEPT FOR the Database, Notecaddydefinitions, Backups and Config folders in:
7: C:\Users\username\AppData\Roaming\HoldemManager\
You must show both hidden files and check unhide system files. See this: http://www.bleepingcomputer.com/tutorials/tutorial151.html
XP: C:\Documents and Settings\User_name\Application Data\HoldemManager
For showing hidden files and unhide system files, see this: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/win_fcab_show_file_extensions.mspx?mfr=true

 

The selected database is now restored.

 

 

 

 

| More

Related Articles


User Opinions (2 votes)

50% thumbs up 50% thumbs down

How would you rate this answer?



Thank you for rating this answer.

Continue