Use the BACKUP DB command to back up an ADSM database to sequential access storage volumes. You can use this command to run one of the following types of backup:
If the database is damaged or lost, you can restore it by using the DSMSERV RESTORE DB command to perform one of the following types of recovery:
To enable the use of roll-forward recovery, use the VOLUMEHISTORY and DEVCONFIG options in the server options file to automatically create volume history and device configuration files. You can also use the BACKUP VOLHISTORY and BACKUP DEVCONFIG commands.
To help you determine how much storage space a full or incremental backup will require, use the QUERY DB command. That command displays the number of changed megabytes in the database.
Note: | If the recovery log runs out of space during a database backup and the log mode is set to ROLLFORWARD, all ADSM transactions in progress are ended and rolled back. No new transactions may begin until the backup is complete and recovery log records are deleted. After the backup is successfully completed, ADSM deletes all recovery log records except those required to restore the database to its most current state when used with the backup of the database that was just created. |
Privilege Class
To issue this command, you must have system privilege or unrestricted storage privilege.
Syntax
>>-BAckup DB---DEVclass--=--devclassname------------------------> .-Type--=--Incremental------. >---+---------------------------+-------------------------------> '-Type--=--+-Incremental-+--' '-Full--------' >----+-------------------------------------+--------------------> | .-,--------. | | V | | '-VOLumenames--=--+---volname---+--+--' '-FILE:filename--' .-Scratch--=--Yes------. .-Wait--=--No-------. >---+----------------------+--+-------------------+------------>< '-Scratch--=--+-Yes-+--' '-Wait--=--+-No--+--' '-No--' '-Yes-'
Parameters
Be sure that you have used the DEVCONFIG option in the dsmserv.opt file to specify an external file in which to store a backup copy of device class definitions. If you do not have this file and your ADSM database is damaged or lost and must be restored, the definitions created by using the DEFINE DEVCLASS command will not be available and must be recreated manually. This parameter is required.
If the mount limit for the device class specified has already been reached (all drives are busy) when the backup runs, ADSM automatically cancels lower priority operations, such as reclamation, to make a mount point available for the backup.
Each incremental backup, whether run automatically by ADSM based on the settings you specify with the DEFINE DBBACKUPTRIGGER command or run by issuing the BACKUP DB command, is added to the count of incremental backups run.
You can run an incremental backup whenever a full backup is not required.
Each full backup, whether run automatically by ADSM based on the settings you specify with the DEFINE DBBACKUPTRIGGER command or run by issuing the BACKUP DB command, resets the count for incremental backups to 0.
Note: | Database backups (full or incremental) are not run automatically unless both the database backup trigger is defined and the recovery log mode is set to ROLLFORWARD. |
Specifies the backup volumes that are to be used to backup the database. This parameter is optional. However, if you specify SCRATCH=NO, you must specify a list of volumes.
For example, to use volumes TAPE01, TAPE02, TAPE03, specify the following:
VOLUMENAMES=TAPE01,TAPE02,TAPE03
For example, to use volumes TAPE01, TAPE02, and TAPE03, create a file named TAPEVOL that contains these lines:
TAPE01 TAPE02 TAPE03
You can then specify the volumes for the command as follows:
VOLUMENAMES=FILE:TAPEVOL
If you include a list of volumes by using the VOLUMENAMES parameter and specify SCRATCH=YES, ADSM uses scratch volumes only if not enough space is available to store the backup data on the specified volumes.
If you do not include a list of volumes by using the VOLUMENAMES parameter, you must either specify SCRATCH=YES or omit the SCRATCH parameter (to use the default).
If you specify volumes by using the VOLUMENAMES parameter and specify SCRATCH=NO, the backup will fail if not enough space is available to store the backup data on the specified volumes.
Note: | You cannot specify Wait=Yes from the server console. |
To cancel a background process, use the CANCEL PROCESS command. If a BACKUP DB background process is canceled, some of the database may have already been backed up before the cancellation.
Examples
Task
Run an incremental backup of the database, using a scratch volume. Assume a device class of FILE for the backup.
Related Commands
Table 15. Commands Related to BACKUP DB
Command | Description |
---|---|
BACKUP DEVCONFIG | Backs up ADSM device information to a file. |
BACKUP VOLHISTORY | Records sequential volume history information in external files. |
CANCEL PROCESS | Cancels a background server process. |
DEFINE DBBACKUPTRIGGER | Defines a trigger for automatic ADSM database backups. |
DSMSERV RESTORE DB | Restores an ADSM database or database volume. |
DELETE VOLHISTORY | Removes sequential volume history information from the volume history file. |
DELETE VOLHISTORY | Removes sequential volume history information from the volume history file. |
QUERY DB | Displays allocation information about the database. |
QUERY DBBACKUPTRIGGER | Displays information about the database backup trigger. |
QUERY PROCESS | Displays information about one or all background server processes. |
QUERY VOLHISTORY | Displays sequential volume history information that has been collected by the server. |
SET LOGMODE | Sets the mode for saving records in the recovery log. |
UPDATE DBBACKUPTRIGGER | Changes one or more attributes of the database backup trigger. |