Submit a ticketCall us

Looking to compare latest NPM features with previous versions of NPM?
The NPM new feature summary offers a comparison of new features and improvements offered with this release.

 

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