DB2 10.5 for Linux, UNIX, and Windows

db2acsutil - Manage DB2 snapshot backup objects command

Lists, deletes, and monitors DB2® snapshot backup objects.

You can use db2acsutil to manage DB2 snapshot backup objects in the following three ways:
  • List the DB2 snapshot backups that you can use to restore your database
  • Delete DB2 snapshot backups that were generated using the BACKUP command, the db2Backup API, or the ADMIN_CMD stored procedure with the BACKUP DATABASE parameter
  • Monitor the status of DB2 snapshot backups

Authorization

None

Required connection

None

Command syntax

Read syntax diagramSkip visual syntax diagram
>>-db2acsutil--------------------------------------------------->

>--+------------------------------------------------------+----->
   '-+-load--libraryName--+--+--------------------------+-'   
     '-script--scriptName-'  '-options--"optionsString"-'     

>--+-query--+--------+-+--+----------+-------------------------->
   |        '-status-' |  '-snapshot-'   
   '-delete------------'                 

>--+---------------------------------+-------------------------->
   '-+-taken at---+--+-timestamp---+-'   
     +-older than-+  '-N--days ago-'     
     '-since------'                      

>--+--------------------+--+----------------------+------------->
   '-+-----+--newest--X-'  '-+-database-+--dbName-'   
     '-not-'                 '-db-------'             

>--+------------------------+----------------------------------->
   '-instance--instanceName-'   

>--+-------------------------------------+---------------------->
   '-dbpartitionnum--db-partition-number-'   

>--+----------------+--+--------------+------------------------->
   '-host--hostname-'  '-show details-'   

>--+-------------------+---------------------------------------><
   '-without prompting-'   

Command parameters

load libraryName
The name of the shared library containing the vendor fast copying technology used in the DB2 snapshot backup. This parameter can contain the full path. If the full path is not given, the default path is the same library as with the BACKUP DATABASE and RESTORE DATABASE commands (in ~/sqllib/acs).
script scriptName
The fully qualified name of the script that created the snapshot objects.
options "optionsString"
Specifies options to be used for this utility. The string will be passed to the vendor support library exactly as it was entered, without the double quotation marks.
query
Queries the DB2 ACS repository and returns a table of known objects.
status
Queries the DB2 ACS repository and returns a table of known objects with their current status.
delete
This deletes DB2 snapshot objects, and removes their record from the DB2 ACS repository after they have been deleted.
snapshot
Filters the records returned or operated on to only snapshot objects.
taken at | older than | since
These options filter the results of the utility to the specified time ranges.
timestamp
A timestamp of the form YYYYMMDDhhmmss.
N days ago
Number of days ago, where N is the number of days before the current date.
[not] newest X
Filter the utility results such that only the newest (by timestamp) X records are considered. If the NOT keyword is specified, then all records except the newest X are considered.
database | db dbName
Considers only those objects associated with the specified database name.
instance instanceName
The name of the database manager instance associated with the DB2 snapshot backup objects you are managing.
dbpartitionnum db-partition-number
Considers only those objects created by the specified database partition number.
host hostname
Considers only those objects created by the specified hostname. For example, this would typically be the TCP/IP hostname of the DB2 server.
show details
Displays detailed object information from the DB2 ACS repository. If this option is used, instead of a table with a single brief record per line, a detailed stanza will be produced for each DB2 ACS object.
without prompting
Specifies that the utility will run unattended, and that any actions which normally require user intervention will return an error message.

Examples

Sample output for a snapshot backup with an active background copy.
db2acsutil query status db f01 instance db2inst1 dbpartitionnum 0

Instance   Database   Part Image Time     Status
========== ========== ==== ============== =======================================
keon14     F01        0    20070719120848 Remotely mountable + Background_monitor
                                                           pending (16 / 1024 MB)
Sample output for a snapshot backup with a completed background copy.
db2acsutil query status db f01 instance db2inst1 dbpartitionnum 0 show details

Instance : keon14
Database : F01
Partition : 0
Image timestamp : 20070719120848
Host : machine1
Owner :
DB2 Version : 9.5.0
Creation time : Thu Jul 19 12:08:50 2007
First active log (chain:file) : 0:0
Metadata bytes : 6196
Progress state : Successful
Usability state : Remotely mountable + Repetitively restorable + Swap restorable
                  + Physical protection + Full copy
Bytes completed : 0
Bytes total : 0

Usage notes

Using db2acsutil is the only way to delete DB2 snapshot backups created using the BACKUP command, the db2Backup API, or the ADMIN_CMD stored procedure with the BACKUP DATABASE parameter. You cannot use automated recovery object deletion or the PRUNE HISTORY command with the AND DELETE parameter to delete DB2 snapshot backups. You also cannot delete backups manually though the filer/storage system.

The usability state of a DB2 snapshot backup indicates what you can do with the DB2 snapshot. Table 1 lists and describes possible DB2 snapshot backup usability states.
Note: If you query a snapshot backup taken with a custom script, the usability state is always returned as Unknown because the usability of the image is dependent on the quality of the script.
Table 1. Usability states returned for DB2 snapshot backups
Usability state Description
LOCALLY_MOUNTABLE You can mount the backed up data from the local machine.
REMOTELY_MOUNTABLE You can mount the backed up data from a remote machine.
REPETITIVELY_RESTORABLE You can use the DB2 snapshot backup image multiple times to restore your backed up data.
DESTRUCTIVELY_RESTORABLE You can use the DB2 snapshot backup image to restore your backed up data once; after the backed up data is restored, this DB2 snapshot image, and potentially others, are destroyed.
SWAP_RESTORABLE You can access the volumes directly, but a RESTORE DB command cannot be executed and the backed up data cannot be copied back onto the source volumes.
PHYSICAL_PROTECTION The snapshot is protected against physical failures in the source volumes.
FULL_COPY A full copy of the data has been created. You can use the DB2 snapshot backup image to restore the backed up data.
DELETED Indicates that a backup has been marked for deletion. The snapshot storage associated with a DELETED backup will be withdrawn via a maintenance process running in the background. Once this has completed, the backup will be removed from the DB2 ACS repository.
FORCED_MOUNT Awaiting verification of filesystem consistency by mounting an AIX® JFS filesystem.
BACKGROUND_MONITOR_PENDING Status is being monitored by the DB2 ACS background progress monitor.
TAPE_BACKUP_PENDING Awaiting an offloaded tape backup.
TAPE_BACKUP_IN_PROGRESS An offloaded tape backup is currently in progress.
TAPE_BACKUP_COMPLETE Offloaded tape backup has completed.