Submit a ticketCall us

Welcome to the NEW Success Center. Search all resources (documentation, videos, training, knowledge base articles) or browse resources by product. If you are unable to find what you are looking for, please contact us at customersuccess@solarwinds.com

 

 

 

 

Home > Success Center > Web Help Desk (WHD) > Back Up and Restore PostgreSQL Using the Command Line

Back Up and Restore PostgreSQL Using the Command Line

Backup File Location:

The backup file will be located at the WHD_HOME_DIR and they are as follows:

Operating System Location
Microsoft Windows "C:\Program Files\WebHelpDesk\"
Linux or Virtual Appliance "/usr/local/webhelpdesk/"
Mac OS X "/Library/WebHelpDesk/"

NOTE: The Virtual Appliance referred in this document is the SolarWinds provided appliance that can be downloaded from the Customer Portal.

To Backup:

Windows:

  1. Open "Start > Run > cmd"
  2. Type: cd C:\Progra~1\WebHelpDesk
  3. Then proceed with the backup process by typing: "pgsql9\bin\pg_dump -Fc -v -h 127.0.0.1 -p 20293 -U whd whd > whd_pgdump.backup"
  4. If prompted for the database password, enter the password whd.

Linux or Virtual Appliance:

  1. Download PuTTY or use any SSHv2 client and connect to the Linux. For the Virtual Appliance, connect as the user 'admin'.
  2. Switch to 'root' user or any user with 'sudo' privileges. In the Virtual Appliance, type "sudo su".
  3. Type: "cd /usr/local/webhelpdesk/"
  4. Then proceed with the backup process by typing: "pgsql9/bin/pg_dump -Fc -v -h 127.0.0.1 -p 20293 -U whd whd > whd_pgdump.backup"
  5. If prompted for the database password, enter the password whd.

Mac OS X:

  1. Open the "Applications > Utilities > Terminal" application.
  2. Type: "cd /Library/WebHelpDesk/"
  3. Then proceed with the backup process by typing: "pgsql9/bin/pg_dump -Fc -v -h 127.0.0.1 -p 20293 -U whd whd > whd_pgdump.backup"
  4. If prompted for the database password, enter the password whd.

To Restore:

Windows

  1. Open "Start > Run > cmd"
  2. Type:  cd C:\Progra~1\WebHelpDesk
  3. Then proceed with the restore process by typing: "pgsql9\bin\pg_restore -Fc -v -h 127.0.0.1 -p 20293 -U whd -d whd path_to_whd_pgdump.backup"
  4. If prompted for the database password, enter the password whd.

Linux or Virtual Appliance:

  1. Connect to the Linux usin an SSHv2 client like PuTTY. For the Virtual Appliance, connect as the user 'admin'.
  2. Switch to 'root' user or any user with 'sudo' privileges. In the Virtual Appliance, type "sudo su".
  3. Type: "cd /usr/local/webhelpdesk/"
  4. Then proceed with the restore process by typing: "pgsql9/bin/pg_restore -Fc -v -h 127.0.0.1 -p 20293 -U postgres -d whd path_to_whd_pgdump.backup"
  5. If prompted for the database password, enter the password whd.

Mac OS X:

  1. Open the "Applications > Utilities > Terminal" application.
  2. Type: "cd /Library/WebHelpDesk/"
  3. Then proceed with the restore process by typing: "pgsql9/bin/pg_restore -Fc -v -h 127.0.0.1 -p 20293 -U postgres -d whd path_to_whd_pgdump.backup"
  4. If prompted for the database password, enter the password whd.
Last modified
15:59, 18 Dec 2015

Tags

Classifications

Public