The delete backup command deletes files, images, and virtual machines that were backed up to Tivoli® Storage Manager server storage. Your administrator must give you authority to delete objects.
When you delete files, Tivoli Storage Manager takes all of the backed-up files that meet the filespec and deltype options that are specified and deactivates them. The server also assigns a deactivation date of infinite-minus so that the files are no longer available for restore, and they are purged on the subsequent run of file expiration. The file is not physically removed until the expiration process runs.






This command is valid for all clients.






>>-Delete BAckup-- --+-----------------------------------+------> '-+-filespec----------------------+-' '-{--filespacename--}--filespec-' >--+-----------------------+------------------------------------> | .-objtype=FILE------. | '-+-------------------+-' +-objtype=IMAGE-----+ '-objtype=VM vmname-' .-deltype=ACTIVE-------. >--+----------------------+-+---------+------------------------>< +-+------------------+-+ '-options-' | '-deltype=INACTIVE-' | '-+-------------+------' '-deltype=ALL-'
When you use -deltype=inactive or -deltype=active, use wildcard characters to specify a group of files or all files in a directory.
When you use -deltype=all, specify a fully wildcarded directory.
When objtype=VM is specified, the filelist option cannot be used. Specifying objtype=VM changes the behavior of the -deltype option. When objtype=vm is specified, you can use either -deltype=active or -deltype=inactive. You cannot use -deltype=all. Specifying -deltype=inactive displays a list of both inactive and active backups. You can use this list to identify which virtual machine backups you want to delete. To delete only active virtual machine backups, use -deltype=active.
When you specify -objtype=VM, this command deletes only virtual machine backups that were created with any of the following modes: FULL, IFINCR, and IFFULL. Individual incremental backups (backups that were created by using MODE=INCR) that were created after a full backup was run cannot be deleted with this command. However, if you delete a full virtual machine image backup (created by using MODE=FULL), and if the server has any incremental backups (MODE=INCR) that were created for this VM after the full backup, then deleting the full VM backup also deletes the files that were created by a MODE=INCR backup.
If you delete an active backup for a virtual machine, the most recent inactive copy becomes the active backup. If you specify the -pick or -inactive option, only the backup that you specify is deleted. If you select a backup that was created by using MODE=IFINCR, only the selected incremental backup is deleted; other incremental backups for the virtual machine are not deleted.
To delete all versions of a file, first issue the delete backup command with -deltype=inactive, then enter the command again with -deltype=active.
| Option | Where to use |
|---|---|
| description | Command line only. |
| filelist | Command line only. |
| fromdate | Command line, and in the GUI find function. |
| fromtime | Command line, and in the GUI find function. |
| noprompt | Command line only. |
| pick | Command line only. |
| pitdate | Command line, and in the GUI find function. |
| pittime | Command line, and in the GUI find function. |
| subdir | Client options file (dsm.opt) or command line. |
| tapeprompt | Client options file (dsm.opt) or command line. |
| timeformat | Client options file (dsm.opt) or command line. |
| todate | Command line, and in the GUI find function. |
| totime | Command line, and in the GUI find function. |




Task



Delete all active and inactive file objects that are named budget in
directory /data/plan/proj1. delete backup /data/plan/proj1/budget.jan
-deltype=inactive
delete backup /data/plan/proj1/budget.jan
-deltype=active




Task



Delete all inactive files that have a .txt extension that were backed up
from the /data/plan/proj1 directory and its subdirectories. Command: delete backup "/data/plan/proj1/*.txt" -deltype=inactive -subdir=yes




Task



Delete selected active files that are backed up from the
/home/marymb/project directory. Use the -pick option to
display a list of backup copies that match the file specification. From the list, you can select
which versions to delete. Command: delete backup "/home/marymb/project/*" -pick




Task



Delete all active and inactive versions of files and subdirectories in the
/home/storman/myproject directory. Then, delete all active and inactive
versions of the /user/myproject directory. delete backup "/home/storman/myproject*"
-deltype=all
Task
Delete all active file objects from file space abc in the
proj directory. Command: delete backup {abc}\proj\*
Task
Delete all inactive files with a name that ends with .txt that were backed
up from the c:\plan\proj1 directory, and its subdirectories. Command: delete backup c:\plan\proj1\*.txt -deltype=inactive -subdir=yes
Task
Delete selected active files that are backed up from the c:\project
directory. Use the -pick option to display a list of backup copies that match the
file specification. From the list, you can select which versions to delete. Command: delete backup c:\project\* -pick
Task
Delete all active and inactive versions of files and subdirectories in
c:\user\myproject. Command: delete backup c:\user\myproject\* -deltype=all
Task
Delete the active backup of a virtual machine that is named vm1.Command: delete backup -objtype=vm vm1
Task
Delete one or more backup versions of a virtual machine that is named vm_test.Command: delete backup -objtype=vm -inactive vm_test