Submit a ticketCall us

Get a crash course on Network Monitoring delivered right to your inbox
This free 7-day email course provides a primer to the philosophy, theory, and fundamental concepts involved in IT monitoring. Lessons will explain not only how to perform various monitoring tasks, but why and when you should use them. Sign up now.

Home > Success Center > Web Help Desk (WHD) > Commands for WHD database export and import

Commands for WHD database export and import

Example of commands needed to export/import the database.

 

Source server

  1. Stop WHD
  2. Open a command line and execute:
    WHD_INSTALL_DIR/pgsql9/bin
  3. Export the database by executing the following command:
    pg_dump -Fc -v -p 20293 -U whd whd > whd.pgdump
  4. Move whd.pgdump to the new server. 

Destination server

 

  1. Stop WHD.
  2. Navigate to WHD_INSTALL_DIR/pgsql9/bin.
  3. If there is already an initialized whd database in place, rename the database using following commands in the psql tool:
    psql -U whd -d template1
    ALTER DATABASE whd rename to whd_old;
  4. Create an empty whd database in psql tool:
    CREATE DATABASE whd;
  5. Restore the database. Exit the psql tool first (\q) to return to the cmd directory (directory WHD_INSTALL_DIR/pgsql9/bin):
    pg_restore -Fc -v -p 20293 -U whd -d whd "path_to_whd.pgdump"
Last modified
16:03, 3 May 2017

Tags

Classifications

Public