Database Backup and Restore
Databases need to have a well-defined and thoroughly tested backup and restore plan so that access to data is not at risk. The backup and recovery of databases involve the process of making a copy of a database in case of an equipment failure or disaster, then retrieving the copied database if needed.
This appendix explains how to back up and restore DCNM-SAN databases.
DCNM-SAN uses the PostgreSQL database management system as the default database. PostgreSQL databases are backed up with the pg_dump command. The pg_dump utility dumps the PostgreSQL database content to an ASCII dump file. The backup dump file represents a snapshot of the database at the time of backup.
The database is restored with the pg_restore utility. The pg_restore utility uses psql to rebuild the PostgreSQL database from the dump file created by pg_dump.
Note Oracle Database Servers are supported for Cisco DCNM and SME. The management, backup, and restoring of Oracle Databases is outside the scope of this document. For more information, contact your local Oracle DBA for a backup and restore plan of your Oracle Database.
For more information about pg_dump, go to this URL:
This appendix includes the following sections:
•Backing Up the DCNM-SAN Database
•Restoring the DCNM-SAN Database
•Database Backup and Restore Operations
Backing Up the DCNM-SAN Database
To back up the DCNM-SAN database, use the PostgreSQL pg_dump command as follows:
./pgbackup.sh 02252008.data (on Linux and Solaris operation systems)
pgbackup.bat 02252008.data (on Windows operating system)
The INSTALLDIR is the top directory of DCNM-SAN Installation, and a backup file (02252008.data) is created in the $INSTALLDIR/bin directory.
Specify the full path name of the dump file to create the backup file in a standard backup directory.
Note In all operating systems, the scripts run the pg_dump command to back up the database.
Restoring the DCNM-SAN Database
To restore the DCNM-SAN database, use the pg_restore command.
./pgrestore.sh 02252008.data (on Linux and Solaris operating systems)
pgrestore.bat 02252008.data (on Windows operating system)
The backup restore process requires the server to be stopped.
Note In all operating systems, the scripts run pg_restore command to restore the database.
Database Backup and Restore Operations
When implementing the DCNM-SAN backup and restore operations, note the following guidelines:
•The new media keys created after the backup of the database are lost after the restore operation since the backup copy does not have the latest media keys.
•If there are new tape backup groups and tape volume groups created after the database backup, the property should be set to true in smeserver.properties before starting the DCNM-SAN. This will synchronize the new volume group keys to the KMC.
This property is also applicable for any tape volume group rekey operation.
•If a master key is rekeyed after the database backup, then restoring the data of the previous database makes the cluster unusable. After the master key rekey operation, make a backup of the database and discard the copies of the previous database backup.