Submit a ticketCall us

Solarwinds & Cisco Live! Barcelona
Join us from the 29th of January to the 2nd of February at Cisco Live 2018 in Barcelona, where we will continue to show how monitoring the network with SolarWinds will keep you ahead of the game. At our booth (WEP 1A), we will demonstrate how SolarWinds network solutions can help. As a bonus, we are also hosting a pre-event webinar - Blame the Network, Hybrid IT Edition with our SolarWinds Head Geek™, Patrick Hubbard on January 24th - GMT (UTC+0): 10:00 a.m. to 11:00 a.m. There's still time to RSVP.

Home > Success Center > Web Help Desk (WHD) > Back up and restore the PostgreSQL database using the command line

Back up and restore the PostgreSQL database using the command line

Overview

This article describes how to back up and restore the embedded PostgreSQL database using the command line.

Environment

Web Help Desk 12.x installed on a server running Microsoft® Windows Server®, Apple® OS X, or Linux. 

Steps

The following table lists the paths to the Web Help Desk home directory.

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

Back up the PostgreSQL database

Windows Server

  1. Open a command prompt.
  2. In the window, execute:
    cd C:\Progra~1\WebHelpDesk
  3. Back up the database.
    Execute:
    pgsql9\bin\pg_dump -Fc -v -h 127.0.0.1 -p 20293 -U whd whd > whd_pgdump.backup
  4. Enter whd if prompted for a database password. 

Linux or Virtual Appliance

You can download the virtual appliance from the Customer Portal

  1. Download and start PuTTY or another SSHv2 client
  2. Connect to the Linux server.
    If you are connecting to a virtual appliance, connect as the user admin
  3. In Linux, switch to root user or any user with sudo privileges.
    In the Virtual Appliance,enter sudo su.
  4. Execute:
    cd /usr/local/webhelpdesk/
  5. Back up the database.
    Execute:
    pgsql9/bin/pg_dump -Fc -v -h 127.0.0.1 -p 20293 -U whd whd > whd_pgdump.backup
    Enter whd if prompted for a database password.

Apple OS X

  1. Open the Applications > Utilities > Terminal application.
  2. Execute:
    cd /Library/WebHelpDesk/
  3. Back up the database.
    Execute:
    pgsql9/bin/pg_dump -Fc -v -h 127.0.0.1 -p 20293 -U whd whd > whd_pgdump.backup
    Enter whd if prompted for a database password.

Restore the PostgreSQL database

Windows Server

  1. Open a command prompt.
  2. In the window, execute:
    cd C:\Progra~1\WebHelpDesk
  3. Restore the database.
    Execute:
    pgsql9\bin\pg_restore -Fc -v -h 127.0.0.1 -p 20293 -U whd -d whd path_to_whd_pgdump.backup
    Enter whd if prompted for a database password.

Linux or Virtual Appliance

  1. Connect to the Linux server.
    If you are connecting to a virtual appliance, connect as the user admin.
  2. Connect to the Linux server.
    If you are connecting to a virtual appliance, connect as the user admin
  3. In Linux, switch to root user or any user with sudo privileges.
    In the Virtual Appliance,enter sudo su.
  4. Execute:
    cd /usr/local/webhelpdesk/
  5. Restore the database.
    Execute:
    pgsql9/bin/pg_restore -Fc -v -h 127.0.0.1 -p 20293 -U postgres -d whd path_to_whd_pgdump.backup
    Enter whd if prompted for a database password.

Apple OS X

  1. Open the Applications > Utilities > Terminal application.
  2. Execute:
    cd /Library/WebHelpDesk/
  3. Restore the database.
    Execute:
    pgsql9/bin/pg_restore -Fc -v -h 127.0.0.1 -p 20293 -U postgres -d whd path_to_whd_pgdump.backup
    Enter whd if prompted for a database password.
Last modified

Tags

Classifications

Public