Database Restore

The database restore utility, pdm_restore, loads an output file from pdm_backup to the CA SDM database. The pdm_restore utility first shuts down the daemons (UNIX) or services (Windows). Then it restores, clears, and replaces all existing database records. Use the formatted ASCII file created by pdm_backup as input for the pdm_restore utility.
casm1401
The database restore utility, pdm_restore, loads an output file from pdm_backup to the CA SDM database. The pdm_restore utility first shuts down the daemons (UNIX) or services (Windows). Then it restores, clears, and replaces all existing database records. Use the formatted ASCII file created by pdm_backup as input for the pdm_restore utility.
You can also use the pdm_restore and pdm_userload utilities to gain access to the CA SDM application in case of a catastrophic database corruption. If your database is damaged to the point where you cannot gain any access to the application and if all other measures have failed, rerun configuration and reinitialize the database to rebuild your database and populate reference data and system tables.
This procedure initializes your database in the same way that you did during the original installation. You can now access CA SDM. The pdm_restore utility can be used to restore the last backed up copy of your database.
For more information, see pdm_restore--Restore a Database.
pdm_restore--Restore a Database
pdm_restore stops CA SDM and then deletes all records from a CA SDM database and replaces them with records from a file you specify with the -f option. The data from the input file is the only data that will be in the CA SDM database after running pdm_restore.
The input file must be created using pdm_extract or pdm_backup, or otherwise formatted for pdm_restore. pdm_backup can back up non-database data, and pdm_restore can restore this data also. pdm_backup and pdm_restore are not recommended when other backup and restoration tools are available.
As part of its processing, pdm_restore first shuts down the daemons (UNIX) or services (Windows).
Syntax
This command has the following format:
pdm_restore [-d] [-g] [-n] [-w] [-v] -f filename
Restrictions
pdm_restore can be run only on a CA SDM server. Only the privileged user or root can run pdm_restore. The following restrictions are applicable if you are using the advanced availability configuration:
  • If you are restoring the database, run the pdm_restore command only on the background server.
  • Ensure that you have stopped all servers (application, background, and standby) before you run the pdm_restore command.
Use pdm_restore only with a full database backup created by pdm_backup, because your current database is deleted and replaced by the backup file. Do not run pdm_restore when users are logged in to CA SDM.
-d
Specifies that only database data is restored.
-g
Specifies that only non-database data be restored. Only windows (forms) and other non-database data are restored.
-n
Specifies that NX.env is restored if restoring non-database data. By default, NX.env is not restored. We recommend that the NX.env file not be restored unless the restore is to the same server the backup came from. Restoring an incorrect NX.env can affect unintended databases.
-w
Specifies that web.cfg is restored if restoring non-database data. By default, web.cfg is not restored.
-v
Specifies verbose mode.
-f
filename
Specifies an input file that contains a full backup created by pdm_backup.
On UNIX, the LIBPATH must be set before running several CA SDM utilities. Use
 pdm_task
 to set the LIBPATH before running a utility. For example, input "pdm_task pdm_clean_attachments ...".