×


PostgreSQL backup failed in Web help desk - Fix it Now ?

Sometimes, we get failure while trying to create a backup from the web interface and restore using the embedded pgAdmin application on the Web Help Desk.

Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to resolve related PostgreSQL errors.


How to backup the PostgreSQL database ? 

  • To begin, log in to Web Help Desk as an administrator.
  • Click Setup > General > Database.
  • Then, click the Vendor drop-down menu and select PostgreSQL.
  • (Optional) In the Backup Schedule row, select a weekly backup schedule.
  • Next, verify that the Backup Folder path is correct.
  • Finally, click Backup Now to back up the database.


How to Restore the PostgreSQL database using pgAdmin3 ?

1. Log in to Web Help Desk as an administrator.

2. Stop and start Web Help Desk.

3. Go to <WHD install location>\WebHelpDesk\pgsql9\bin folder and click pgAdmin3.exe.

4. Start pgAdmin3.

5. Click the connector icon.

6. In the New Server Registration window, enter the following parameters in the Properties tab, leaving the other fields empty or with default data:

Name: WHDDB
Host: localhost
Port: 20293
Username: whd
Password: whd
whd is the default password

7. In the pgAdmin3 Object Browser, expand Servers > WHDDB > Databases > whd.

8. Right-click whd and select Delete/Drop.

9. Right-click Databases and select New Database.

10. Enter whd as the new database name, whd as Owner in the dropdown.

11. Go to Definition tab and set Collation and Character type to English_United_States.1252 in the dropdown lists

12. Click OK.

13. Right-click the new whd database and click Restore.

14. Navigate to the database file or enter the filename.

15. Select Custom in the Format.

16. Leave Number of Jobs as blank.

17. Select whd as the Rolename.

18. Click Restore.

19. Restart Web Help Desk (Stop and start Web Help Desk).


PostgreSQL backup failed in Web help desk

The following error displays on clicking Backup Now in Web Help Desk Backup:

Backup command returned exit code 1:

pg_dump: [archiver (db)] connection to database "whd" failed: could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432?


How to fix PostgreSQL backup failed in Web help desk ?

To resolve this error, follow the steps given below:

1. Firstly, verify if the database is running on PostgreSQL Embedded.

2. Then, check postgresql.conf if listen_addresses and port are commented (with #).

3. If not, edit postgresql.conf and verify that it is commented by adding # before listen_addresses and port.

4. Next, check the port assigned for whd.db.port in the .whd.properties file and verify that:

5. If the database is external postgresql, the port is 5432.

6. If the database is PostgreSQL Embedded, the port is 20293.

7. Create a backup of .whd.properties.

8. Stop the Web Help Desk service. Refer to Stop and start Web Help Desk.

9. Edit .whd.properties as per step 4 and save.

10. Then, start Web Help Desk.

11. Finally, create a backup.


[Need help to fix PostgreSQL error? We are available 24*7. ]


Conclusion

This article covers methods to resolve PostgreSQL database and fix PostgreSQL error. It may be necessary to create a backup and restore your Web Help Desk database.

This is how to back up and restore the Web Help Desk 12.x PostgreSQL embedded database. The process involves creating a backup from the web interface and restore using the embedded pgAdmin application on the Web Help Desk.