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
Alternatively, you can back up an Encyclopedia volume schema using the command‑line version of pg_dump. The following example duplicates the operations performed in the previous section using the graphical PostgreSQL administration tool, pgAdmin. You do not need to do both activities.
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.
Back up Encyclopedia volume metadata using pg_dump by performing the following tasks.
How to run pg_dump from a command prompt
1 Open a command prompt.
2 Navigate to the following location:
C:\Program Files (x86)\Actuate\iHub2\postgresql\bin
3 Execute the following command. Substitute your machine name for urup in this example:
pg_dump.exe --host urup --port 8432 --username postgres
--format custom --blobs --verbose --file
"C:\Actuate\iHub\encyc_backup\iserver.backup" iserver
This operation backs up the entire iserver database. If the ‑n argument specifying a specific schema or list of schemas is not specified, pg_dump exports all non‑system schemas. Alternatively, you can back up only one Encyclopedia volume schema, such as ac_corp, by using the ‑n argument to specify a particular schema.
4 Type the postgres superuser password. The administrator specified this password in PostgreSQL Database Information during the iHub installation procedure.
pg_dump executes, writing status messages to the command prompt.
After backing up the Encyclopedia volume metadata, back up the acserverconfig.xml file and volume data directories to the backup directory by performing the following tasks.
How to back up the volume data folders
1 Open Windows Explorer and navigate to AC_DATA_HOME, which is the location of the iHub data. You specified this location on Setup Type during the install. The default path for AC_DATA_HOME is:
C:\Actuate\iHub\data
2 In AC_DATA_HOME, navigate to the config folder that contains acserverconfig.xml file. In BIRT iHub, this file is located in the following subfolder:
C:\Actuate\iHub\data\config\iHub2
3 Select acserverconfig.xml, right click, and choose Copy.
Copy this file to the following backup location:
C:\Actuate\iHub\encyc_backup
4 In AC_DATA_HOME\encyc, select the file and filetype folders, and status folder, if it exists, right-click, and choose Copy. Copy these folders to the following backup location:
C:\Actuate\iHub\encyc_backup
In a backup taken immediately after an iHub installation, where there has been no activity on the system, the status folder may not exist. This folder contains information about job details and completion notices and does not appear until a job executes. If this folder is not present in the environment, simply back up the file and fileType folders.
Do not back up the postgresql folder in an Encyclopedia volume backup operation. The postgres folder contains data, such as log files, from the OOTB PostgreSQL RDBMS installation, which remains active. Inadvertently including these files in an iHub backup, then accidentally overwriting the files with a stale version in a restore operation can cause problems in the PostgreSQL RDBMS installation.