DELETE VOLHISTORY (Delete sequential volume history information)

Use this command to delete volume history file records that are no longer needed (for example, records for obsolete database backup volumes).

When you delete records for volumes that are not in storage pools (for example, database backup or export volumes), the volumes return to scratch status even if IBM Spectrum Protect™ acquired them as private volumes. Scratch volumes of device type FILE are deleted. When you delete the records for storage pool volumes, the volumes remain in the IBM Spectrum Protect database. When you delete records for recovery plan file objects from a source server, the objects on the target server are marked for deletion.
Restriction: Do not use the DELETE VOLHISTORY command to delete information about backup set volumes from the volume history file. Instead, use the DELETE BACKUPSET command for this purpose.

For users of DRM, the database backup expiration should be controlled with the SET DRMDBBACKUPEXPIREDAYS command instead of this DELETE VOLHISTORY command. Use the DELETE VOLHISTORY command to remove a record of the volume. This can cause volumes to be lost that were managed by the MOVE DRMEDIA command. Use the SET DRMDBBACKUPEXPIREDAYS command to manage the automatic expiration of DRM database backup volumes.

Tips:
  • Volumes for the most recent database backup series are not deleted.
  • Existing volume history files are not automatically updated with this command.
  • You can use the DEFINE SCHEDULE command to periodically delete volume history records.

Privilege class

To issue this command, you must have system privilege.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-DELete VOLHistory--TODate--=--date--------------------------->

   .-TOTime--=--23:59:59-.   
>--+---------------------+-------------------------------------->
   '-TOTime--=--time-----'   

>--Type--=--+-All---------------------------------------+------><
            +-DBBackup--+-------------------------+-----+   
            |           '-DEVclass--=--class_name-'     |   
            +-DBSnapshot--+-------------------------+---+   
            |             '-DEVclass--=--class_name-'   |   
            +-DBRpf-------------------------------------+   
            +-EXPort------------------------------------+   
            |         .-DELETELatest--=--No------.      |   
            +-RPFile--+--------------------------+------+   
            |         '-DELETELatest--=--+-No--+-'      |   
            |                            '-Yes-'        |   
            |              .-DELETELatest--=--No------. |   
            +-RPFSnapshot--+--------------------------+-+   
            |              '-DELETELatest--=--+-No--+-' |   
            |                                 '-Yes-'   |   
            +-STGNew------------------------------------+   
            +-STGReuse----------------------------------+   
            '-STGDelete---------------------------------'   

Parameters

TODate (Required)
Specifies the date to use to select sequential volume history information to be deleted. You can delete only those records with a date on or before the date that you specify. You can specify the date by using one of the following values:
Value Description Example
MM/DD/YYYY A specific date 01/23/1999
TODAY The current date TODAY
TODAY-days or -days The current date minus days specified. The maximum number of days you can specify is 9999. TODAY–30 or –30.

To delete records that are 30 or more days old, you can specify TODAY-30 or simply -30.

EOLM (End Of Last Month) The last day of the previous month. EOLM
EOLM-days The last day of the previous month minus days specified. EOLM-1

To include files that were active a day before the last day of the previous month.

BOTM (Beginning Of This Month) The first day of the current month. BOTM
BOTM+days The first day of the current month, plus days specified. BOTM+9

To include files that were active on the 10th day of the current month.

TOTime
Specifies that you want to delete records that are created on or before this time on the specified date. This parameter is optional. The default is the end of the day (23:59:59). You can specify the time by using one of the following values:
Value Description Example
HH:MM:SS A specific time on the specified date 12:30:22
NOW The current time on the specified date NOW
NOW+HH:MM or +HH:MM The current time plus hours and minutes on the specified date NOW+03:00 or +03:00.

If you issue the DELETE VOLHISTORY command at 9:00 with TOTIME=NOW+03:00 or TOTIME=+03:00, IBM Spectrum Protect deletes records with a time of 12:00 or earlier on the specified date.

NOW-HH:MM or -HH:MM The current time minus hours and minutes on the specified date NOW-03:30 or -03:30.

If you issue the DELETE VOLHISTORY command at 9:00 with TOTIME=NOW-3:30 or TOTIME=-3:30, IBM Spectrum Protect deletes records with a time of 5:30 or earlier on the specified date.

Type (Required)
Specifies the type of records, which also meet the date and time criteria, to delete from the volume history file. Possible values are:
All
Specifies to delete all records.
Restriction: The DELETE VOLHISTORY command does not delete records of remote volumes.
DBBackup
Specifies to delete only records that contain information about volumes that are used for database full and incremental backups, that is, with volume types of BACKUPFULL and BACKUPINCR, and that meet the specified date and time criteria. The records from the latest full and incremental database backup series will not be deleted.
DEVclass=class_name
Specifies the device class name that was used to create the database backups. This optional parameter can be used to delete database backups that are created by using a server-to-server virtual volume device class. The type of the device class must be SERVER. This parameter can be used only to delete volume history entries of type BACKUPFULL, BACKUPINCR, or DBSNAPSHOT.
A full or incremental database backup volume is eligible to be deleted if all of the following conditions are met:
  • The device class that was used to create the database backup volume matches the specified device class.
  • The volume was created on or before the specified date and time.
  • The volume is not part of the latest full plus incremental database backup series.
  • The volume is not part of a full plus incremental backup series with an incremental database backup that was created after the specified date and time.
DBSnapshot
Specifies to delete only records that contain information about volumes that are used for snapshot database backups, and that meet the specified date and time criteria. Records that are related to the latest snapshot database backup will not be deleted.
DEVclass=classname
Specifies the device class name that was used to create the database backups. This optional parameter can be used to delete database backups that are created by using a server-to-server virtual volume device class. The type of the device class must be SERVER. This parameter can only be used to delete volume history entries of type BACKUPFULL, BACKUPINCR, or DBSNAPSHOT.
A snapshot database backup volume is eligible to be deleted if all of the following conditions are met:
  • The device class that is used to create the database backup volume matches the specified device class
  • The volume was created on or before the specified date and time
  • The volume is not part of the latest snapshot database backup series
DBRpf
Specifies to delete only records that contain information about full and incremental database backup volumes and recovery plan file volumes.
EXPort
Specifies to delete only records that contain information about export volumes.
RPFile
Specifies to delete only records that contain information about recovery plan file objects that are stored on a target server and that meet the specified date and time criteria.
DELETELatest
Specifies whether the latest recovery plan file is eligible for deletion. This optional parameter can be used to delete the latest recovery plan files that are created by using a server-to-server virtual volume device class.

This parameter can be used only to delete volume history entries of type RPFILE (for instance, those recovery plan files that were created by using the DEVCLASS parameter with the PREPARE command). If this parameter is not specified, the latest RPFILE entries are not deleted.

No
Specifies the latest RPFILE file is not deleted.
Yes
Specifies the latest RPFILE file is deleted if it meets the specified date and time criteria.
RPFSnapshot
Specifies to delete only records that contain information about recovery plan file objects that were created for snapshot database backups, that are stored on a target server and that meet the specified date and time criteria. The latest RPFSNAPSHOT file will not be deleted unless it meets the specified date and time criteria, and the DELETE parameter is set to Yes.
DELETELatest
Specifies whether the latest recovery plan file is eligible for deletion. This optional parameter can be used to delete the latest recovery plan files that are created by using a server-to-server virtual volume device class.

This parameter can only be used to delete volume history entries of type RPFSNAPSHOT (for instance, those recovery plan files that were created by using the DEVCLASS parameter with the PREPARE command). If this parameter is not specified, the latest RPFSNAPSHOT entries are not deleted.

No
Specifies the latest RPFSNAPSHOT file is not deleted.
Yes
Specifies the latest RPFSNAPSHOT file is deleted if it meets the specified date and time criteria.
STGNew
Specifies to delete only records that contain information about new sequential access storage volumes.
STGReuse
Specifies to delete only records that contain information about reused sequential storage pool volumes.
STGDelete
Specifies to delete only records that contain information about deleted sequential storage pool volumes.

Example: Delete recovery plan file information

Delete all recovery plan file information that is created on or before 03/28/2016.
delete volhistory type=rpfile todate=03/28/2016

Related commands

Table 1. Commands related to DELETE VOLHISTORY
Command Description
BACKUP VOLHISTORY Records volume history information in external files.
DEFINE SCHEDULE Defines a schedule for a client operation or an administrative command.
DELETE VOLUME Deletes a volume from a storage pool.
EXPIRE INVENTORY Manually starts inventory expiration processing.
MOVE DRMEDIA Moves DRM media onsite and offsite.
PREPARE Creates a recovery plan file.
QUERY RPFILE Displays information about recovery plan files.
QUERY VOLHISTORY Displays sequential volume history information that has been collected by the server.
SET DRMRPFEXPIREDAYS Set criteria for recovery plan file expiration.
SET DRMDBBACKUPEXPIREDAYS Specifies criteria for database backup series expiration.