Backing up an Encyclopedia volume : Backing up and restoring an Encyclopedia volume that uses a PostgreSQL database : Backing up an Encyclopedia volume using pg_dump
 
Backing up an Encyclopedia volume using pg_dump
To back up an Encyclopedia volume using the pg_dump utility, perform the following tasks:
*Create a folder to contain the metadata and volume data backup files.
*Back up Encyclopedia volume metadata using the PostgreSQL pg_dump utility.
*Back up the acserverconfig.xml file and volume data folders to the backup folder.
The following example shows a typical pg_dump command used to export the contents of an Encyclopedia volume schema to a backup file:
pg_dump -F c -n ac_corp -f ac_corp_schema.dmp -h dbhost -p 8432 -U postgres dbname
This pg_dump command example uses the following arguments:
*F
Specifies the output format. The value c is an abbreviation for custom, which creates a compressed archive that can be used as input to pg_restore.
*n
Species the schema. Use multiple -n arguments to specify a list. Use wildcard notation to specify a character pattern, such as ac_*. to specify all volumes names that start with the prefix ac_. If -n is not specified, pg_dump exports all non-system schemas.
*f
Specifies the output file, such as ac_corp_schema.dmp.
*h
Specifies the host name of the machine where the PostgreSQL server is running, such as dbhost.
*p
Specifies the port where the server listens for connection requests.
*U
Specifies the user name for the connection to the PostgreSQL server, such as postgres.
*dbname
Replace this string in the example with the database name, such as actuate_db.
Re-run the command to back up each Encyclopedia volume schema to a separate archive. To run multiple volume schema backups using a script, set up auto-login using a .pgpass file. The file should contain connection information in the following format:
hostname:port:database:username:password
More information about setting up a scripted backup using a .pgpass file is available at:
http://www.postgresql.org/docs/8.4/static/libpq-pgpass.html
Create a folder to contain the metadata and volume data backup files outside the iHub data installation environment. To provide protection against single-point media failure, it is best to store the backup files on a partition that is physically separate from the Encyclopedia volume data location.
In a Linux environment, create a folder to contain the metadata and volume data backup files by performing the following tasks.