PostgreSQL Backups
PostgreSQL Backup
First off the official documentation can be found here.
PLANET ARGON currently uses both 32, and 64 bit architectures. Therefore we do not recommend backing up your database cluster by simply backing up the files as these may not be easily restored on another system. Instead it is best to use backup tools that come with PostgreSQL such as pg_dump, and pg_dumpall.
Be sure to use the same version of these commands as your database cluster. So use the full pathname. Which may be different from my example. Since all PostgreSQL users at PLANET ARGON have a private server it is easiest to archive the whole database cluster.
/usr/local/pgsql-8.1/bin/pg_dumpall -D > ~/backup_db/dumpall.sql
Unless you set up PGPORT, and PGUSER environment variables you will need to specify your port number, or username to connect to your database.
If you are doing this with an automated script you will want to setup passwords as well.
~/.pgpass
hostname:port:database:username:password