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.

The command displays the following file information:
  • 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.
If you use the detail option with the query backup command, the client displays the following extra information:
  • Last modification date
  • AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsLast file attributes (inode) change date
  • Windows operating systemsCreation date
  • Compression
  • Encryption type
  • Client-side data deduplication
  • AIX operating systemsLinux operating systemsWhether 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.
AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsWindows operating systems

Supported Clients

This command is valid for all clients.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-Query Backup--+------------+--------------------------------->
                 '- --options-'   

>--+- --filespec----------------------+--+- --filespec---+-----><
   '- --{--filespacename--}--filespec-'  '- --"filespec"-'   

Parameters

AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsfilespec
AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsSpecifies 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.
Windows operating systemsfilespec
Windows operating systemsSpecifies 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.
Windows operating systems{filespacename}
Windows operating systemsSpecifies 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.

Table 1. Query Backup command: Related options
Option Where to use
backupsetname Command line only.
AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsWindows operating systemsclass AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsWindows operating systemsCommand line only.
Windows operating systemsdateformat Windows operating systemsClient options file (dsm.opt) or command line.
AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsdateformat AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsClient 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.
AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsMac OS X operating systemsfromowner AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsMac OS X operating systemsCommand line only.
fromtime Command line only.
inactive Command line only.
AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsnasnodename AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsClient system options file (dsm.sys) or command line.
Windows operating systemsnasnodename Windows operating systemsClient options file (dsm.opt) or command line.
Windows operating systemsnumberformat Windows operating systemsClient options file (dsm.opt) or command line.
AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsnumberformat AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsClient user-options file (dsm.opt) or command line.
pitdate Command line only.
pittime Command line only.
querysummary Command line only.
Windows operating systemsscrolllines Windows operating systemsClient options file (dsm.opt) or command line.
AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsscrolllines AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsClient user-options file (dsm.opt) or command line.
Windows operating systemsscrollprompt Windows operating systemsClient options file (dsm.opt) or command line.
AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsscrollprompt AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsClient user-options file (dsm.opt) or command line.
Windows operating systemssubdir Windows operating systemsClient options file (dsm.opt) or command line.
AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemssubdir AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsClient user-options file (dsm.opt) or command line.
Windows operating systemstimeformat Windows operating systemsClient options file (dsm.opt) or command line.
AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemstimeformat AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsClient user-options file (dsm.opt) or command line.
todate Command line only.
totime Command line only.

Examples

Windows operating systemsdsmc query backup c:\* -subdir=yes -querysummary

Windows operating systemsdsmc query archive c:\* -subdir=yes -querysummary

Windows operating systemsTask
Windows operating systemsQuery files from the abc file space proj directory.

dsmc query backup {"abc"}\proj\*.*

AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsTask
AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsDisplay a list of all active and inactive backup versions of your files in the current directory.

dsmc query backup –inactive "*"

Windows operating systemsTask
Windows operating systemsDisplay a list of all active and inactive backup versions that were backed up from the c:\proj directory.

dsmc q backup –ina c:\proj\*

AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsTask
AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsDisplay 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 "*"

Windows operating systemsTask
Windows operating systemsDisplay 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\*

Windows operating systemsTask
Windows operating systemsDisplay 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\*

AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsTask
AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsDisplay 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*"

AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsTask
AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsDisplay a list of active and inactive backup file versions in the /home file system.

dsmc q b –ina –su=yes /home/

Windows operating systemsTask
Windows operating systemsLast week you backed up files from a diskette labeled docs. Display a list of those files.

dsmc q b {docs}\*

AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsTask
AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsQuery file system images from the nas2 NAS file server.

dsmc query backup -nasnodename=nas2 -class=nas

Windows operating systemsTask
Windows operating systemsQuery file system images from the nas2 NAS file server.

dsmc query backup -nasnodename=nas2 -class=nas

Windows operating systemsTask
Windows operating systemsDisplay 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

Windows operating systemsTask
Windows operating systemsDisplay information about all the active and inactive backup versions of the system state on the server.

dsmc query backup -ina systemstate