DeskNow Knowledge Base
 
      
Home Backup and migration How to backup the PostgreSQL database

How to backup the PostgreSQL database

Linux/Unix

Backup:

  1. pg_dump -U desknowserver -W desknow -h 127.0.0.1 > /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

Restore:

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

Windows

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.

Email Article Email
Print Article Print


How helpful was this article to you?
Related Articles
article Performance tuning for PostgreSQL database (Linux)
Note: this page is for tuning PostgreSQL on...

  October 27, 2004    Views: 103499   
article Performance tuning for the embedded PostgreSQL database (Windows)
PostgreSQL can be a very fast database, but its...

  August 11, 2006    Views: 24401   
article How to backup the MySQL database
The easiest method is to use a free utility...

  May 12, 2004    Views: 65014   



Powered by Lore :: (c)2003 Pineapple Technologies.