7.2 Backing Up the Database

The system automatically backs up the database on a daily basis. The backups are in /var/iic/db-backups on the db-host (as defined in /opt/iic/conf/global-config). Each backup is a tar(1) archive compressed using the bzip21 utility. The current daily backup is called db.tar.bz2.

You can also back up the database at any arbitrary time using the pg_dump(1) utility. The state of the database in the backup reflects all committed transactions at the time pg_dump(1) is run. Any updates done after the backup is started are ignored.

The following command line shows how to dump the contents of the database to a tar(1) archive named db.tar:

pg_dump -b -F t -f db.tar <db_name>
bzip2 db.tar

You can execute pg_dump on the db_host machine or set up the PostgreSQL environment variables according to the database configuration in /opt/iic/conf/global-config.