Restore the PostgreSQL database on a new server
You can migrate WHD to a new server running an identical or disparate operating system when required. If WHD is connected to an embedded PostgreSQL database, restore the embedded PostgreSQL database on the new host server.
You can restore the database by performing the following procedure or executing a command.
- Log in to the new WHD host server as an administrator.
- Copy the backup file from the old server to the new server.
- Stop WHDon the new server.
- On your WHD server, open the Apps page and click Services.
- In the Services window, ensure that one of the following services is running and displays in the list:
To start the service, right-click the service and select Start.
- Web Help Desk PostgreSQL Embedded Database
- PostgreSQL Embedded Database
- Navigate to your
- Microsoft Windows:
- Navigate to
pgsql9\binand double-click pgAdmin3.
- In the pgAdmin3 window, click File > Add Server.
- Add the following information in the window:
- Maintenance DB:
- In the Guru Hint window, click OK.
- Expand Databases.
- Right-click whd and select Delete/Drop from the menu.
- In the Guru Hint window, click Yes, and then click OK.
- Right-click Databases and select New Database.
- Set the following:
whdand select Restore.
- Navigate to the backup file that you copied from the old server, and then click Restore.
- Start WHD on the new server.
You can use the following command to restore the PostgreSQL database:
pg_restore -Fc -h 127.0.0.1 -p 20293 -U whd -d whd <path_to_whd_backup_file>
-his the target host.
-pis the port number.
-Uis the user name being used.
-dis the target database name.