Query Archive

The query archive command displays a list of your archived files and the following information about each file: file size, archive date, file specification, expiration date, and archive description.

If you use the detail option with the query archive command, the client displays the following additional information:
  • Last modification date
  • AIX operating systemsHP-UX operating systemsLinux operating systemsOracle Solaris operating systemsMac OS X operating systemsLast access 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
  • AIX operating systemsHP-UX operating systemsLinux operating systemsMac OS X operating systemsOracle Solaris operating systemsWindows operating systemsClient-side data deduplication
  • Retention initiation
  • Whether the file is on hold

The following show sample output from the detail option.

AIX operating systemsHP-UX operating systemsLinux operating systemsMac OS X operating systemsOracle Solaris operating systems
Size Archive Date - Time File - Expires on - Description
---- ------------------- -------------------------------
219 B 09/03/2009 09:32:13 /Volumes/Data/info.txt 09/03/2010
Archive Date: 09/03/2009 
RetInit:STARTED Obj
Held:NO
Modified: 09/02/2009 19:43:00 Accessed: 09/03/2009 09:31:23 Inode changed: 09/02/2009 19:43:00
Compressed: NO Encryption Type: None
Client-deduplicated: NO 
Windows operating systems
Size Archive Date - Time File - Expires on - Description
---- ------------------- -------------------------------
219 B 09/03/2009 09:32:13 \\halley\m$\tsm620c.0901fa\debug\bin\
winnt_unicode\dsm.opt 09/03/2010 
Archive Date: 09/03/2009 
RetInit:STARTED Obj
Held:NO
Modified: 09/02/2009 19:43:00 Created: 09/01/2009 15:31:23
Compressed: NO Encryption Type: None
Client-deduplicated: NO 
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 ARchive--+------------+-------------------------------->
                  '- --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 query all archived files in the current directory.
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.

If you include filespacename, do not include a drive letter in the file specification. Drive label names are only used for removable media.

Windows operating systems{filespacename}
Windows operating systemsSpecifies the file space (enclosed in braces) on the server that contains the file that you want to query. The file space is the name on the workstation drive from which the file was archived. The following example is valid for specifying a UNC name: {'\\machine\C$'}.
Use the filespacename if the name was changed or if you are querying files that were archived from another node with drive labels that are different from yours.
Note: You must specify a mixed or lowercase NTFS filespacename that is enclosed in quotation marks within 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 Archive command: Related options
Option Where to use
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 user-options file (dsm.opt) or command line.
description Command line only.
detail Command line only.
dirsonly Command line only.
filelist Command line only.
filesonly Command line only.
fromdate Command line only.
fromnode 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.
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.
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

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 archived files in the current working directory.

Command: q archive "*"

Windows operating systemsTask
Windows operating systemsDisplay a list of all your archived files in the c:\proj directory.

Command: q ar 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 archived files in the /devel directory and all of its subdirectories.

Command: query archive "/devel/*" -subdir=yes

Windows operating systemsTask
Windows operating systemsDisplay a list of archived files from your c: drive with the description "January Ledgers".

Command: query archive c:\ -su=y -descr="January Ledgers"

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 archived files in the current directory. Use the dateformat and timeformat options to reformat the dates and times.

Command: q ar –date=5 –time=1 "*"

Windows operating systemsTask
Windows operating systemsDisplay a list of all your archived files in the c:\proj directory. Use the dateformat and timeformat options to reformat the dates and times.

Command: q ar –date=5 –time=4 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 archived files in the current directory. Use the detail option to display the last modification date and the last access date of each file.

Command: q ar -detail "*"

Windows operating systemsTask
Windows operating systemsDisplay a list of all your archived files in the c:\dir1 directory. Use the detail option to display the last modification date and the creation date of each file.

Command: q ar -detail c:\dir1\*

Windows operating systemsTask
Windows operating systemsDisplay a list of archived files in the c:\proj directory that contains a file extension of .dev. Use the dateformat and timeformat options.

Command: q ar –date=5 –time=4 c:\proj\*.dev

Windows operating systemsTask
Windows operating systemsRecently you changed the label of your c:\ drive to store and archive some files. Then, yesterday the label was changed to dev and some more files were archived. Display a list of all the files you archived in the c:\proj directory when the label was store.

Command: q ar {store}\proj\*

Windows operating systemsTask
Windows operating systemsRecently you archived files from a diskette labeled docs. Display a list of all the files you archived.

Command: q ar {docs}\*

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 archived files in the /home/proj directory whose first four characters of the file name begin with proj.

Command: q ar "/home/proj/proj*"