Invoking a backup or a restore operation using vendor products
You can invoke a backup or a restore operation using vendor products by using the control center, the command-line and API function calls. You can also use the history file as an aid in database recovery operations.
- Control Center
- Command line processor (CLP)
- LIST HISTORY command
- UPDATE HISTORY FILE command
- PRUNE HISTORY command
- APIs
- db2HistoryOpenScan
- db2HistoryGetEntry
- db2HistoryCloseScan
- db2HistoryUpdate
- db2Prune
O
. If the backup operation was
directed to TSM, the DEVICE field contains an A
.
The LOCATION field contains either: - The vendor file name specified when the backup operation was invoked.
- The name of the shared library, if no vendor file name was specified.
The LOCATION field can be updated using the Control Center, the CLP, or an API. The location of backup information can be updated if limited capacity devices (for example, removable media) have been used to hold the backup image, and the media is physically moved to a different (perhaps off-site) storage location. If this is the case, the history file can be used to help locate a backup image if a recovery operation becomes necessary.
- The Control Center
- The command line processor (CLP)
- An application programming interface (API).
The Control Center
The Control Center is the graphical user interface for database administration that is shipped with Db2.
To specify | The Control Center input variable for backup or restore operations |
---|---|
Use of vendor device and library name | Is Use Library. Specify the library name (on UNIX based systems) or the DLL name (on the Windows operating system). |
Number of sessions | Is Sessions. |
Vendor options | Is not supported. |
Vendor file name | Is not supported. |
Transfer buffer size | Is (for backup) Size of each Buffer, and (for restore) not applicable. |
The command line processor (CLP)
The command line processor (CLP) can be used to invoke the Db2 BACKUP DATABASE or the RESTORE DATABASE command.
To specify | The command line processor parameter for backup is | The command line processor parameter for restore is |
---|---|---|
Use of vendor device and library name | library-name | shared-library |
Number of sessions | num-sessions | num-sessions |
Vendor options | options-string | options-string |
Vendor file name | file-name | file-name |
Transfer buffer size | buffer-size | buffer-size |
Backup and restore API function calls
Two API function calls support backup and restore operations: db2Backup for backup and db2Restore for restore.
To specify | The API parameter (for both db2Backup and db2Restore) is |
---|---|
Use of vendor device and library name | as follows: In structure sqlu_media_list, specify a media type of SQLU_OTHER_MEDIA, and then in structure sqlu_vendor, specify a shared library or DLL in shr_lib. |
Number of sessions | as follows: In structure sqlu_media_list, specify sessions. |
Vendor options | PVendorOptions |
Vendor file name | as follows: In structure sqlu_media_list, specify a media type of SQLU_OTHER_MEDIA, and then in structure sqlu_vendor, specify a file name in filename. |
Transfer buffer size | BufferSize |