BACKUP DB (Back up the database)

Use this command to back up a Tivoli® Storage Manager database to sequential access volumes.

Attention: To restore a database, the server must use information from the volume history file and the device configuration file. You must make and save copies of the volume history file and the device configuration file. These files cannot be recreated.

To determine how much extra storage space a backup requires, issue the QUERY DB command.

Restrictions: You cannot restore a server database if the release level of the server database backup is different from the release level of the server that is being restored. For example, an error occurs when you restore a Version 6.3 database and you are using a Version 7.1 Tivoli Storage Manager server.
After the database backup is complete, the Tivoli Storage Manager server backs up information, depending on the options that are specified in the server options file. The following information is backed up:
  • Sequential volume-history information is backed up to all files that the VOLUMEHISTORY option specifies
  • Information about device configuration is backed up to all files that the DEVCONFIG option specifies
  • The server's master encryption key
If there is not enough space available on the defined active log directory volume or file space, you can define the DB2® option, overflowlogpath, to use a directory with the required space available. For example, use the following command to use the /home/tsminst2/overflow_dir directory:
db2 update db cfg for TSMDB1 using overflowlogpath /home/tsminst2/overflow_dir

Privilege class

To issue this command, you must have system privilege or unrestricted storage privilege.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-BAckup DB--DEVclass--=--device_class_name-------------------->

   .-Type--=--Full------------.   
>--+--------------------------+--------------------------------->
   '-Type--=--+-Incremental-+-'   
              +-Full--------+     
              '-DBSnapshot--'     

>--+---------------------------------------+-------------------->
   |                   .-,-----------.     |   
   |                   V             |     |   
   '-VOLumenames--=--+---volume_name-+---+-'   
                     '-FILE:-- file_name-'     

   .-NUMStreams--=--1------.  .-Scratch--=--Yes-----.   
>--+-----------------------+--+---------------------+----------->
   '-NUMStreams--=--number-'  '-Scratch--=--+-Yes-+-'   
                                            '-No--'     

   .-Wait--=--No------.  .-DEDUPDEVice--=--No------.   
>--+------------------+--+-------------------------+------------>
   '-Wait--=--+-No--+-'  '-DEDUPDEVice--=--+-No--+-'   
              '-Yes-'                      '-Yes-'     

   .-COMPress--=--No----------.  .-PROTECTKeys--=--Yes-----.   
>--+--------------------------+--+-------------------------+---->
   |                      (1) |  '-PROTECTKeys--=--+-No--+-'   
   '-COMPress--=--+-No--+-----'                    '-Yes-'     
                  '-Yes-'                                      

>--+----------------------------+------------------------------><
   '-PASSword--=--password_name-'   

Notes:
  1. The default value of the COMPRESS parameter is conditional. If you specify the COMPRESS parameter in the BACKUP DB command, it overrides any COMPRESS parameter value that is set in the SET DBRECOVERY command. Otherwise, the value that is set in the SET DBRECOVERY command is the default.

Parameters

DEVclass (Required)
Specifies the name of the sequential access device class to use for the backup. If you issue the BACKUP DB command, and the device class is not the one that is specified in the SET DBRECOVERY command, a warning message is issued. However, the backup operation continues and is not affected.

If the SET DBRECOVERY command is not issued to set a device class, the BACKUP DB command fails.

Restriction:
  • You cannot use a device class with a device type of NAS or CENTERA.
  • A restore database operation fails if the source for the restore is a FILE library. A FILE library is created if the FILE device class specifies SHARED=YES.

If all drives for this device class are busy when the backup runs, Tivoli Storage Manager cancels lower priority operations, such as reclamation, to make a drive available for the backup.

Type
Specifies the type of backup to run. This parameter is optional. The default is FULL. The following values are possible:
Full
Specifies that you want to run a full backup of the Tivoli Storage Manager database.
Incremental
Specifies that you want to run an incremental backup of the Tivoli Storage Manager database. An incremental (or cumulative) backup image contains a copy of all database data that is changed since the last successful full backup operation.
DBSnapshot
Specifies that you want to run a full snapshot database backup. The entire contents of a database are copied and a new snapshot database backup is created without interrupting the existing full and incremental backup series for the database.
VOLumenames

Specifies the volumes that are used to back up the database. This parameter is optional. However, if you specify SCRATCH=NO, you must specify a list of volumes.

volume_name
Specifies the volumes that are used to back up the database. Specify multiple volumes by separating the names with commas and no intervening spaces.
FILE:filename
Specifies the name of a file that contains a list of volumes that are used to back up the database. Each volume name must be on a separate line. Blank lines and comment lines, which begin with an asterisk, are ignored.
For example, to use volumes DB0001, DB0002, and DB0003, create a file that contains these lines:
DB0001
DB0002
DB0003
Name the file appropriately. For example:
  • AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsTAPEVOL
  • Windows operating systemsTAPEVOL.DATA

You can then specify the volumes for the command as follows:

AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systems
VOLUMENAMES=FILE:TAPEVOL
Windows operating systems
VOLUMENAMES=FILE:TAPEVOL.DATA
NUMStreams
Specifies the number of parallel data movement streams to use when you back up the database. The minimum value is 1, and the maximum value is 32. Increasing the value causes a corresponding increase in the number of database backup sessions to be used and the number of drives to be used for the device class. If you specify a NUMSTREAMS value in the BACKUP DB command, it overrides any value that is set in the SET DBRECOVERY command. Otherwise, the value that is set in the SET DBRECOVERY command is used. The NUMSTREAMS value is used for all types of database backups.
If a value is specified that is greater than the number of drives available for the device class, only the number of available drives are used. The available drives are those defined to the device class by the MOUNTLIMIT parameter or by the number of online drives for the specified device class. The session is displayed in the QUERY SESSION output.
If you increase the number of streams, more volumes are used from the corresponding device class for this operation. Using more volumes might improve the speed of the database backups, but at the cost of more volumes that are not fully used.
Scratch
Specifies whether scratch volumes can be used for the backup. This parameter is optional. The default is YES. The following values are possible:
Yes
Specifies that scratch volumes can be used.

If you specify SCRATCH=YES and the VOLUMENAMES parameter, Tivoli Storage Manager uses only scratch volumes if space is unavailable 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 use the default.

No
Specifies that scratch volumes cannot be used.

If you specify volumes by using the VOLUMENAMES parameter and SCRATCH=NO, the backup fails if there is not enough space available to store the backup data on the specified volumes.

Wait
Specifies whether to wait for the server to complete processing this command in the foreground. The default is NO. The following values are possible:
No
Specifies that the server processes this command in the background. You can continue with other tasks while the command is being processed.

Messages that are created from the background process are displayed either in the activity log or the server console, depending on where messages are logged.

To cancel a background process, use the CANCEL PROCESS command. If a BACKUP DB background process is canceled, some of the database might have already been backed up before the cancellation.

Yes
Specifies that the server processes this command in the foreground. Wait for the command to complete before you continue with other tasks. The server then displays the output messages to the administrative client when the command completes.
Restriction: You cannot specify WAIT=YES from the server console.
DEDUPDEVice
Specifies that a target storage device supports data deduplication. When set to YES, the format for backup images is optimized for data deduplication devices, making backup operations more efficient. The following values are possible:
No
Specifies that a target storage device does not support data deduplication. NO is the default.
Ensure that this parameter is set to NO for the following devices:
  • SCSI libraries
  • All devices that are defined with a FILE device class
  • Virtual tape libraries (VTL) that do not support the data deduplication function
Yes

Specifies that a target device supports data deduplication and that you want to optimize backups for this function. You can set this parameter to YES if you are using VTLs that support data deduplication.

COMPress
Specifies whether volumes that are created by the BACKUP DB command are compressed. The COMPRESS value is used for all types of database backups. This parameter is optional. The default value is conditional. If you specify the COMPRESS parameter on the BACKUP DB command, it overrides any value that is set in the SET DBRECOVERY command. Otherwise, the value that is set in the SET DBRECOVERY command is the default. You can specify one of the following values:
No
Specifies that the volumes that are created by the BACKUP DB command are not compressed.
Yes

Specifies that the volumes that are created by the BACKUP DB command are compressed.

Restrictions:
  • Use caution when you specify the COMPRESS parameter. Using compression during database backups can reduce the size of the backup files. However, compression can increase the time that is required to complete database backup processing.
  • Do not back up compressed data to tape. If your system environment stores database backups on tape, set the COMPRESS parameter to No in the SET DBRECOVERY and BACKUP DB commands.
PROTECTKeys
Specifies that database backups include a copy of the server master encryption key that is used to encrypt storage pool data. This parameter is optional. The default is the value that is specified for the PROTECTKEYS parameter on the SET DBRECOVERY command. You can specify one of the following values:
No
Specifies that database backups do not include a copy of the server master encryption key.
Attention: If you specify PROTECTKEYS=NO, you must manually back up the master encryption key for the server and make the key available when you implement disaster recovery.
Yes
Specifies that database backups include a copy of the server master encryption key.
Attention: If you specify PROTECTKEYS=YES, you must also specify the PASSWORD parameter.
PASSword
Specifies the password that is used to protect the database backup. The default is the value that is specified for the PASSWORD parameter on the SET DBRECOVERY command.
Important: Ensure that you remember this password. If you specify a password for database backups, you must specify the same password on the RESTORE DB command to restore the database.

Example: Run an incremental backup by using a scratch volume

Run an incremental backup of the database by using a scratch volume. Use a device class of FILE for the backup.
backup db devclass=file type=incremental

Example: Encrypt storage pool data in database backups

Encrypt storage pool data by specifying that database backups include a copy of the server master encryption key. Issue the following command:
backup db protectkeys=yes password=password_name

Related commands

Table 1. Commands related to BACKUP DB
Command Description
BACKUP DEVCONFIG Backs up Tivoli Storage Manager device information to a file.
BACKUP VOLHISTORY Records volume history information in external files.
CANCEL PROCESS Cancels a background server process.
DELETE VOLHISTORY Removes sequential volume history information from the volume history file.
EXPIRE INVENTORY Manually starts inventory expiration processing.
MOVE DRMEDIA Moves DRM media onsite and offsite.
PREPARE Creates a recovery plan file.
QUERY DB Displays allocation information about the database.
QUERY PROCESS Displays information about background processes.
QUERY VOLHISTORY Displays sequential volume history information that has been collected by the server.
SET DBRECOVERY Specifies the device class to be used for automatic backups.
SET DRMDBBACKUPEXPIREDAYS Specifies criteria for database backup series expiration.