Next Topic

Previous Topic

Book Contents

BVE Database Maintenance on UNIX

On UNIX platforms, a backup utility is executed from the Traverse cron job (<TRAVERSE_HOME>/utils/runPeriodicTasks.pl) nightly (see Scheduled Tasks on UNIX). By default these backup utilities create a tar-gzipped archive in the <TRAVERSE_HOME>/database/backup directory with names of the form backup-mm-dd-yy,hh-mm.tar.gz. If you want to create these files somewhere else, edit the <TRAVERSE_HOME>/utils/db_backup.sh script to specify the destination by changing the backupPath variable. Always make sure that there is sufficient disk space for the backup files.

Manually Backing up the Provisioning Database (Online)

To export the Provisioning Database to an XML file while Traverse is running, execute the following commands:

cd <TRAVERSE_HOME>/apps/poet/bin
LD_LIBRARY_PATH=<TRAVERSE_HOME>/apps/poet/lib
export LD_LIBRARY_PATH
./ptxml -export -file /tmp/proxdb.xml -server localhost -base provisioning -overwrite

This creates a backup of the Provisioning Database in /tmp. You can then archive/copy the provdb.xml backup to tape or other backup media.

Manually Backing up the Provisioning Database (Offline)

To back up the Provisioning Database while offline (if Traverse is not operating), either:

To create an XML export of the database while offline, execute the following commands:

cd <TRAVERSE_HOME>
utils/databaseUtil.pl --action export --file /tmp/provdb.xml

This creates an exported XML copy of the Provisioning Database in /tmp. Copy provdb.xml to a safe location.

Restoring the Provisioning Database (Online)

To restore the Provisioning Database from a previously exported XML file, use the following commands:

cd <TRAVERSE_HOME>
LD_LIBRARY_PATH=<TRAVERSE_HOME>/apps/poet/lib
export LD_LIBRARY_PATH
apps/poet/bin/ptxml -import -file /tmp/provdb.xml -server localhost -base provisioning

These commands assume that the exported XML file is in /tmp/provdb.xml. If the file is elsewhere on the system, modify the commands accordingly.

Restoring the Provisioning Database (Offline)

To restore the Provisioning Database while Traverse is shut down, use the databaseUtil.pl script:

cd <TRAVERSE_HOME>
etc/traverse.init stop
databaseUtil.pl --action import --file /tmp/provdb.xml

These commands assume that the exported XML file is in /tmp/provdb.xml. If the file is elsewhere on the system, modify the commands accordingly.

If you copied the /provisioning and /provisioningdict directories while Traverse is offline, you need to shut down Traverse, copy the two directories back into the /database folder in <TRAVERSE_HOME>, and start all components.

Restoring the Provisioning Database from Automated Backup

Assuming that you properly installed the Traverse crontab, UNIX installations of Traverse automatically create daily backup snapshots in the <TRAVERSE_HOME>/database/backup directory. Note that only a BVE host backs up the Provisioning Database. All other hosts only back up their local DGE database.

To restore the Provisioning Database from the daily backup snapshot, uncompress and un-tar the archive into the <TRAVERSE_HOME> directory. You must stop Traverse before restoring the database.

cd <TRAVERSE_HOME>
etc/traverse.init stop
cd database
mv provisioning provisioning.OLD
mv provisioningdict provisioningdict.old
cd ..
gunzip -c database/backup/backup-mm-dd-yy,hh-mm.tar.gz | tar xvf - database/provisioning database/provisioningdict
<TRAVERSE_HOME>/etc/traverse.init start

The daily backup snapshot should include the /provisioning and /provisioningdict directories, as well as an exported XML (provdb.xml) copy of the database. You should use the procedure above if you have copies of the appropriate directories. If you do not have the directory snapshots, you must use the provdb.xml file from the backup snapshot, or the one that you created in Manually Backing up the Provisioning Database (Online) above.

To restore from the provdb.xml:

  1. Shut down all Traverse components.
  2. Execute following commands:
su
cd <TRAVERSE_HOME>
utils/databaseUtil.pl --action import --file /tmp/provdb.xml