From: DeskNow Knowledge Base

How to backup the PostgreSQL database



  1. pg_dump -U desknowserver -W desknow -h > /var/desknowbackup.sql
  2. when prompted, enter the db password for the db user desknowserver (ex. 'password')
  3. the command will generate a file called /var/desknowbackup.sql - if you need to store this file, it is recommended to compress it with gzip, as this will greatly reduce its size


recreate the desknow (or use another name) database following the standard procedure:

  1. su - postgres
  2. psql template1 desknowserver
  3. create database desknow with encoding='UNICODE';
  4. \c desknow desknowserver
  5. \i /var/desknowbackup.sql


Please use the Administration/Backup page in the web interface. By default, the Windows version of DeskNow includes PostgreSQL and it automatically performs scheduled db backups every night. For restore, please see the Administration manual.