Hi,
the original KB contains basic instructions only and will be replaced by KB with advanced instructions. Here is the draft, but you should hopefully find all details you need. Two important things to know: 1. you have to run commands as root (using sudo), 2. you have to run commands with full path to the program you want to run (e.g. PGadmin). See below.
Most of these commands needs to be executed in command line, to open command line follow there instructions:
- Windows - in Start → Run type cmd, it should be automatically opened with administrative privileges
- Mac OS X - Go to /Applications/Utilities and double-click on Terminal.
- Linux (RPM installation) - when using graphical interface open the terminal from Applications/System tools menu or right clicking Desktop and hitting Open in Terminal (it can vary in different distributions), you can also connect remotely via SSH protocol as described in following section for Virtual Appliance
- Virtual Appliance (Linux) - it's needed to connect to the server using SSH protocol, execute ssh username@server_ip_or_hostname command on Mac OS X and Linux or use PuTTY utility on Windows platform (credentials admin/admin)
Please note that this KB uses standard installation directories for a reference. In case you installed WHD to a non standard directory replace C:\Progra~1\WebHelpDesk (Windows), /Library/WebHelpDesk (Mac OS C), /usr/local/webhelpdesk (Linux + VA) by the correct locations in all commands.
Stop WHD application
- Windows
- use Stop Web Help Desk shortcut from Start menu (Run as Administrator) items or execute following commands in command line
- cd C:\Progra~1\WebHelpDesk
- whd stop
- use Stop Web Help Desk shortcut from Start menu (Run as Administrator) items or execute following commands in command line
- Mac OS X
- Go to /Applications/WebHelpDesk and use Stop Web Help Desk icon from Start menu (Run as Administrator) items or execute following commands in terminal
- cd /Library/WebHelpDesk
- ./whd stop
- Go to /Applications/WebHelpDesk and use Stop Web Help Desk icon from Start menu (Run as Administrator) items or execute following commands in terminal
- Linux (RPM installation)
- cd /usr/local/webhelpdesk/
- sudo ./whd stop
- the previous command stops also embedded PostgreSQL database service, we need to start it to be able to run DB commands, type: sudo bin/pgsql/etc/rc.d/init.d/postgresql-9.2 start
- Virtual Appliance (Linux)
- cd /usr/local/webhelpdesk/
- sudo ./whd stop
- the previous command stops also embedded PostgreSQL database service, we need to start it to be able to run DB commands, type: sudo bin/pgsql/etc/rc.d/init.d/postgresql-9.2 start
- Windows
Start WHD application
- Windows
- use Start Web Help Desk shortcut from Start menu (Run as Administrator) items or execute following commands in command line
- cd C:\Progra~1\WebHelpDesk
- whd start
- use Start Web Help Desk shortcut from Start menu (Run as Administrator) items or execute following commands in command line
- Mac OS X
- Go to /Applications/WebHelpDesk and use Start Web Help Desk icon from Start menu (Run as Administrator) items or execute following commands in terminal
- cd /Library/WebHelpDesk
- ./whd start
- Linux (RPM installation)
- cd /usr/local/webhelpdesk/
- sudo ./whd start
- the previous command starts also embedded PostgreSQL database service (if not running)
- Virtual Appliance (Linux)
- cd /usr/local/webhelpdesk/
- sudo ./whd start
- the previous command starts also embedded PostgreSQL database service (if not running)
- Windows
Stop the embedded PostgreSQL DB
- Windows (PostgreSQLServiceWHD - Help Desk PostgreSQL Embedded Database)
- net stop PostgreSQLServiceWHD
- Mac OS X
- cd /Library/WebHelpDesk
- ./pg stop
- Linux (RPM installation)
- cd /usr/local/webhelpdesk/
- sudo bin/pgsql/etc/rc.d/init.d/postgresql-9.2 stop
- Virtual Appliance (Linux)
- cd /usr/local/webhelpdesk/
- sudo bin/pgsql/etc/rc.d/init.d/postgresql-9.2 stop
- Windows (PostgreSQLServiceWHD - Help Desk PostgreSQL Embedded Database)
Start the embedded PostgreSQL DB
- Windows
- net start PostgreSQLServiceWHD
- Mac OS X
- cd /Library/WebHelpDesk
- ./pg start
- Linux (RPM installation)
- cd /usr/local/webhelpdesk/
- sudo bin/pgsql/etc/rc.d/init.d/postgresql-9.2 stop
- Virtual Appliance (Linux)
- cd /usr/local/webhelpdesk/
- sudo bin/pgsql/etc/rc.d/init.d/postgresql-9.2 stop
- Windows
Backup PostgreSQL embedded database (dump will be located at WHD_HOME_DIR)
- Windows
- cd C:\Progra~1\WebHelpDesk
- pgsql9\bin\pg_dump -Fc -v -p 20293 -U whd whd > whd.pgdump
- If prompted for DB password use "whd"
- Mac OS X
- cd /Library/WebHelpDesk
- sudo sh -c 'pgsql9/bin/pg_dump -Fc -v -p 20293 -U whd whd > whd.pgdump' (you need to know superuser password)
- If prompted for DB password use "whd"
- Windows
- Linux (RPM installation)
- cd /usr/local/webhelpdesk/
- sudo sh -c 'pgsql9/bin/pg_dump -Fc -v -p 20293 -U whd whd > whd.pgdump'
- If prompted for DB password use "whd"
- Virtual Appliance (Linux)
- cd /usr/local/webhelpdesk/
- sudo sh -c 'pgsql9/bin/pg_dump -Fc -v -p 20293 -U whd whd > whd.pgdump'
- If prompted for DB password use "whd"
Restore PostgreSQL database backup
- Windows
- cd C:\Progra~1\WebHelpDesk
- pgsql9\bin\pg_restore -Fc -v -p 20293 -U whd -d whd path_to_whd.pgdump
- If prompted for password use "whd"
- Mac OS X
- cd /Library/WebHelpDesk
- sudo pgsql9/bin/pg_restore -Fc -v -p 20293 -U whd -d whd path_to_whd.pgdump (you need to know superuser password)
- If prompted for password use "whd"
- Linux (RPM installation)
- cd /usr/local/webhelpdesk/
- sudo pgsql9/bin/pg_restore -Fc -v -p 20293 -U postgres -d whd path_to_whd.pgdump
- If prompted for password use "whd"
- Virtual Appliance (Linux)
- cd /usr/local/webhelpdesk/
- sudo pgsql9/bin/pg_restore -Fc -v -p 20293 -U postgres -d path_to_whd.pgdump
- If prompted for password use "whd"
- Windows
Rename/Drop default empty PostgreSQL embedded database
- Windows
- cd C:\Progra~1\WebHelpDesk
- Connect to database using pgsql9\bin\psql -p 20293 -U whd -d template1
- If prompted for password use "whd"
- Execute following statements:
- ALTER DATABASE whd rename to whd_old;
- CREATE DATABASE whd;
- exit psql tool (\q and Enter)
- Mac OS X
- cd /Library/WebHelpDesk
- Connect to database using sudo pgsql9/bin/psql -p 20293 -U whd -d template1(you need to know superuser password)
- If prompted for password use "whd"
- Execute following statements:
- ALTER DATABASE whd rename to whd_old;
- CREATE DATABASE whd;
- exit psql tool (\q and Enter)
- Linux (RPM installation)
- cd /usr/local/webhelpdesk/
- Connect to database using sudo pgsql9/bin/psql -p 20293 -U whd -d template1
- If prompted for password use "whd"
- Execute following statements:
- ALTER DATABASE whd rename to whd_old;
- CREATE DATABASE whd;
- exit psql tool (\q and Enter)
- Virtual Appliance (Linux)
- cd /usr/local/webhelpdesk/
- Connect to database using sudo pgsql9/bin/psql -p 20293 -U whd -d template1
- If prompted for password use "whd"
- Execute following statements:
- ALTER DATABASE whd rename to whd_old;
- CREATE DATABASE whd;
- exit psql tool (\q and Enter)
- Windows
Copy PostgreSQL database backup from original server to target server
- Copy to Windows
- use SMB to copy files between Windows systems or from Mac/Linux/VA to Windows
- Copy from Windows to Mac OS X/Linux/VA
- when copying files from Windows to Mac/Linux/VA you can use pscp utility
- i.e. to copy files to Virtual Appliance you can use following command
- <path_to_pscp.exe>\pscp.exe "path_to_whd.pgdump" admin@<IP_address_of_virtual_appliance>:/home/admin
- if prompted for password use "admin"
- Copy files between Mac OS X/Linux/VA
- scp command can be used to copy files between these systems
- i.e. to copy files to Virtual Appliance you can use following command
- scp path_to_whd.pgdump admin@<IP_address_of_virtual_appliance>:/home/admin
- if prompted for password use "admin"
- Copy to Windows
Rename/Delete entire PostgreSQL database "data folder"
- Windows
- C:\Progra~1\WebHelpDesk\pgsql9\data
- move source_dir destination
- Mac OS X
- data folder location: /Library/WebHelpDesk/pgsql9/data
- sudo mv /path/to/source /path/to/dest
- data folder location: /Library/WebHelpDesk/pgsql9/data
- Linux (RPM installation)
- data folder location: /usr/local/webhelpdesk/bin/pgsql/var/lib/pgsql/9.2/data
- sudo mv /path/to/source /path/to/dest
- Virtual Appliance (Linux)
- data folder location: /data1/pgdata
- sudo mv /path/to/source /path/to/dest
- Windows
Copy the entire PostgreSQL database "data folder"
- Copy to Windows
- use SMB to copy files between Windows systems or from Mac/Linux/VA to Windows
- Copy from Windows to Mac OS X/Linux/VA
- when copying files from Windows to Mac/Linux/VA you can use pscp utility
- i.e. to copy folder to Virtual Appliance you can use following command
- <path_to_pscp.exe>\pscp.exe -r "path_to_folder" admin@<IP_address_of_virtual_appliance>:/home/admin/.
- if prompted for password use "admin"
- Copy files between Mac OS X/Linux/VA
- scp command can be used to copy files between these systems
- i.e. to copy folder to Virtual Appliance you can use following command
- scp -r path_to_folder admin@<IP_address_of_virtual_appliance>:/home/admin/.
- if prompted for password use "admin"
- Copy to Windows