Query Backup
The query backup command displays a list of backup versions of your files that are stored on the Tivoli® Storage Manager, or that are inside a backup set from the server when the backupsetname option is specified.
- File specification
- File size
- Backup date
- Whether the file is active or inactive
- The management class that is assigned to the file. Only the first 10 characters of the management class name are displayed.
- Last modification date
- Last file attributes (inode) change date
- Creation date
- Compression
- Encryption type
- Client-side data deduplication
- Whether the file is migrated or premigrated. A value of Yes means that the file is migrated or premigrated. A value of No means that the file is not migrated or premigrated.
Supported Clients
This command is valid for all clients.
Syntax
>>-Query Backup--+------------+---------------------------------> '- --options-' >--+- --filespec----------------------+--+- --filespec---+----->< '- --{--filespacename--}--filespec-' '- --"filespec"-'
Parameters
- filespec
- Specifies the path and file name that you want to query. Use wildcard characters to specify a group of files or all the files in a directory. If you use wildcard characters, enclose the file specification in double quotation marks. Specify an asterisk (*) to display information about backup versions for all of your files in the current directory. Do not use wildcards characters when you query NAS file system images with -class=nas option setting.
- filespec
- Specifies the path and file name that you want to query. Use wildcard
characters to specify a group of files or all the files in a directory.
Do not use wildcard characters when you query NAS file system images
with -class=nas option setting.
If you include filespacename, do not include a drive letter in the file specification. Drive label names are only used for removable media.
You can also use the following value for filespec:
- systemstate
- Displays the list of backup versions of Windows system state.
- {filespacename}
- Specifies the file space, enclosed in braces, on the server that
contains the file you want to query. This is the drive label or UNC
name on the workstation drive from which the file was backed up. The
following example shows how to specify a UNC name: {'\\machine\C$'}.
Use the filespacename if the name has changed, or if you want to query files backed up from another node with drive label names that are different from yours.
You must specify a mixed or lowercase NTFS or ReFS file space name that is enclosed in quotation marks and braces. For example, {"NTFSDrive"}. Single quotation marks or double quotation marks are valid in loop mode. For example: {"NTFSDrive"} and {'NTFSDrive'} are both valid. In batch mode, only single quotation marks are valid.
Option | Where to use |
---|---|
backupsetname | Command line only. |
class | Command line only. |
dateformat | Client options file (dsm.opt) or command line. |
dateformat | Client system options file (dsm.sys) or command line. |
detail | Command line only. |
dirsonly | Command line only. |
filelist | Command line only. |
filesonly | Command line only. |
fromdate | Command line only. |
fromowner | Command line only. |
fromowner | Command line only. |
fromtime | Command line only. |
inactive | Command line only. |
nasnodename | Client system options file (dsm.sys) or command line. |
nasnodename | Client options file (dsm.opt) or command line. |
numberformat | Client options file (dsm.opt) or command line. |
numberformat | Client user-options file (dsm.opt) or command line. |
pitdate | Command line only. |
pittime | Command line only. |
querysummary | Command line only. |
scrolllines | Client options file (dsm.opt) or command line. |
scrolllines | Client user-options file (dsm.opt) or command line. |
scrollprompt | Client options file (dsm.opt) or command line. |
scrollprompt | Client user-options file (dsm.opt) or command line. |
subdir | Client options file (dsm.opt) or command line. |
subdir | Client user-options file (dsm.opt) or command line. |
timeformat | Client options file (dsm.opt) or command line. |
timeformat | Client user-options file (dsm.opt) or command line. |
todate | Command line only. |
totime | Command line only. |
Examples
dsmc query backup c:\* -subdir=yes -querysummary
dsmc query archive c:\* -subdir=yes -querysummary
- Task
- Query files from the abc file space proj directory.
dsmc query backup {"abc"}\proj\*.*
- Task
- Display a list of all active and inactive backup versions of your
files in the current directory.
dsmc query backup –inactive "*"
- Task
- Display a list of all active and inactive backup versions that
were backed up from the c:\proj directory.
dsmc q backup –ina c:\proj\*
- Task
- Display a list of all your backups in the current directory. Use
the detail option to display the last modification
date and the last access date of each file.
dsmc q backup -detail "*"
- Task
- Display a list of all your backups in the c:\dir1 directory. Use the detail option to display the
last modification date and the creation date of each file.
dsmc q backup -detail c:\dir1\*
- Task
- Display a list of all active and inactive backup versions that
were backed up from the c:\proj directory. Use the dateformat and timeformat options to reformat
the dates and times.
dsmc q b –date=5 –time=4 –ina c:\proj\*
- Task
- Display a list of files that were backed up from the /home/proj directory with file names that begin with proj.
dsmc q b "/home/proj/proj*"
- Task
- Display a list of active and inactive backup file versions in
the /home file system.
dsmc q b –ina –su=yes /home/
- Task
- Last week you backed up files from a diskette labeled docs. Display a list of those files.
dsmc q b {docs}\*
- Task
- Query file system images from the nas2 NAS file server.
dsmc query backup -nasnodename=nas2 -class=nas
- Task
- Query file system images from the nas2 NAS file server.
dsmc query backup -nasnodename=nas2 -class=nas
- Task
- Display a list of all files from your c drive
that are contained in the backup set weekly_accounting_data.32145678.
dsmc query backup c:\* -subdir=yes -backupsetname=weekly_accounting_data.32145678
- Task
- Display information about all the active and inactive backup versions
of the system state on the server.
dsmc query backup -ina systemstate