Backing up an Encyclopedia volume : Backing up and restoring an Encyclopedia volume that uses a PostgreSQL database : Restoring an Encyclopedia volume using pg_restore
 
Restoring an Encyclopedia volume using pg_restore
To restore a backed up Encyclopedia volume, perform the following tasks:
*Take the Encyclopedia volume offline.
*Delete the acserverconfig.xml and volume data folders in AC_DATA_HOME.
*Copy the backed up acserverconfig.xml file and volume data folders from the backup folder to AC_DATA_HOME.
*Restore the Encyclopedia volume metadata using the PostgreSQL pg_restore utility.
*Take the Encyclopedia volume online.
The pg_restore utility runs using arguments similar to the pg_dump utility. The following example shows a typical pg_restore command used to import the contents of a backup file to an Encyclopedia volume schema:
pg_restore -h mydbhost -p 8432 -U postgres -d db_nameac_corp_schema.dmp
Run pg_restore by performing the following tasks.
How to take the Encyclopedia volume offline
1 In a web browser type:
http://localhost:8900/acadmin/config
Log in to Configuration Console as Administrator.
2 In the simple view, choose Advanced view. Choose Volumes.
3 On Volumes, take the volume offline, as shown in Figure 10‑7.
Figure 10‑7 Taking the volume offline
How to restore the backed up volume data folders
1 Navigate to the AC_DATA_HOME/config/iHub2 folder that contains the acserverconfig.xml file.
Delete acserverconfig.xml, as shown in Figure 10‑8.
Figure 10‑8 Deleting acserverconfig.xml
2 In AC_DATA_HOME, open the encyc folder.
In AC_DATA_HOME/encyc, delete the file and filetype folders, and status folder, if it exists, as shown in Figure 10‑9.
In a backup taken immediately after an iHub installation where there has been no activity on the system, the status folder may not exist. Be sure to not delete the postgresql folder.
Figure 10‑9 Deleting the file and filetype folders
3 Navigate to the following location:
/home/actuate/encyc_backup
Copy acserverconfig.xml to the appropriate AC_DATA_HOME/config/iHub2 folder, as shown in Figure 10‑10.
Figure 10‑10 Copying acserverconfig.xml to AC_DATA_HOME/config/iHub2
The contents of AC_DATA_HOME/config/iHub2 appear as shown in Figure 10‑11.
Figure 10‑11 Viewing the contents of AC_DATA_HOME/config/iHub2
4 Copy the file and filetype folders, and status folder, if it exists, to AC_DATA_HOME/encyc, as shown in Figure 10‑12.
Figure 10‑12 Copying the volume data folders to AC_DATA_HOME/encyc
The contents of AC_DATA_HOME/encyc appear as shown in Figure 10‑13.
Figure 10‑13 Viewing the contents of AC_DATA_HOME/encyc
How to run pg_restore
1 Navigate to the following location:
/home/actuate/AcServer/postgresql/bin
2 Execute the following command. Substitute your machine name for devcomm-lnx-rh-01 in this example:
./pg_restore --host devcomm-rhel6-05 --port 8432 --username postgres --dbname iserver --clean --verbose "/home/actuate/AcServer/encyc_backup/iserver.backup"
3 The command line appears as shown in Figure 10‑14.
Figure 10‑14 Entering the command to execute pg_restore
How to take the Encyclopedia volume online
1 In a web browser, type:
http://localhost:8900/acadmin/config
Log in to Configuration Console as Administrator.
2 In the simple view, choose Advanced view. Choose Volumes.
3 On Volumes, take the volume online, as shown in Figure 10‑15.
Figure 10‑15 Taking the volume online
More information about backing up and restoring an Encyclopedia volume schema using the PostgreSQL pg_dump and pg_restore utilities is available at:
http://www.postgresql.org/docs/8.4/static/backup.html