Query-backup operation

The query-backup operation displays a list of backup versions of your files stored on the IBM Tivoli Storage Manager server.

The following table describes the elements for the query-backup operation:


Adapter request elements for the query-backup operation

Element

Definition

Required

<timeout-secs>

Specifies the duration, in seconds, before the session expires

Valid value: Any positive integer

Default value: 60

No

<operation-name>

Specifies the name of the operation : query-backup

Yes

<filespec>

Specifies the file name and path of the file that you want to query

Use wildcard characters to select a group of files or all the files in a directory. Do not use wild cards when you query the Network Attached Storage (NAS) file system images with the value of the <class> element set to nas.

Note

On UNIX, if the expression contains wildcards then the expression must be enclosed in quotation marks.

No

<class>

Specifies whether to display a list of NAS or client objects

Valid values: client, nas

No

<dateformat>

Specifies the format to display dates

Valid values:

  • MM/DD/YYYY
  • DD-MM-YYYY
  • DD.MM.YYYY
  • YYYY.MM.DD
  • YYYY-MM-DD

No

<detail>

Displays management class, file space, backup, and archive information depending on the command with which it is used

No

<dirsonly>

Specifies whether to process only directories

The client does not process files.

No

<filelist>

Specifies the file containing the list of files to be opened and processed

When you use the <filelist> element, IBM Tivoli Storage Manager ignores all other file specifications on the command line for all operations except the restore and retrieve operations.

Note

The <filelist> element does not support any wildcard characters.

No

<filesonly>

Restricts query processing to files only

No

<fromnode>

Specifies that one node performs commands for another node

If you are using a different node, then you must use the <set-access> command to query files or images for the other node.

No

<fromdate>

Specifies the date from when you want to query for backups or archives during a restore, retrieve, or query operation

Files that are archived or a back up is taken before this date are not included, although older directories might be included, if necessary, to restore or retrieve the files.

No

<fromtime>

Specifies the time from when you want to search for backups or archives during a query operation

IBM Tivoli Storage Manager ignores the <fromtime> element if you do not specify the <fromdate> element.

No

<todate>

Specifies an end date to which you want to search for backups or archives during query operation

For example, you might request a list of files for which a backup is taken before 11:59 PM on June 30, 2002.

No

<totime>

Specifies an end date and time until which you want to search for backups or archives during a query operation

For example, you might request a list of files for which a backup is taken before 11:59 PM on June 30, 2003. IBM Tivoli Storage Manager ignores this element if you do not specify the <todate> element.

No

<subdir>

Specifies whether you want to include subdirectories of the named directories for processing

Valid values: yes, no

Note

When you use the <subdir> element, the <filelist> element is not valid.

No

<inactive>

Specifies whether to display both active and inactive objects

No

<pitdate>

Specifies the date when you want to display or restore the latest version of your backups

Files or images for which a backup is taken and are not deleted on or before the date that you specify, are processed. Backup versions that you create after this date and time are ignored.

Note

When the <pitdate> element is used, the <inactive> element is required.

No

<pittime>

Specifies the time when you want to display or restore the latest version of your backups

Files or images for which a backup is taken and are not deleted on or before the time that you specify, are processed. Backup versions that you create after this date and time are ignored.

Note

You cannot use <pitdate> or <pittime> elements with the <fromdate> and <fromtime> elements. In addition, you cannot specify <pittime> without specifying <pitdate>.

No

<numberformat>

Specifies the format to display numbers

Valid values:

  • d,ddd.dd
  • d,ddd,dd
  • d ddd,dd
  • d ddd.dd
  • d.ddd,dd
  • d'ddd,dd

No

<timeformat>

Specifies the format to display the system time

Valid values:

  • HH:MM:SS (0-23 hour format)
  • HH,MM,SS (0-23 hour format)
  • HH.MM.SS (0-23 hour format)
  • hh:mm:ssAM/PM

No

<nasnodename>

Specifies the node name for the Network Attached Storage (NAS) file server when processing the NAS file systems

The node name identifies the NAS file server to the IBM Tivoli Storage Manager server. The server must register the NAS file server.

Note

The <nasnodename> element is required when the nas is provided as the value for the <class> element.

No

The following figure shows a sample adapter request for the query-backup operation:

Sample adapter request for the query-backup operation

<tsm-request>
  <operation-name>query-backup</operation-name>
  <command-request>
    <timeout-secs>120</timeout-secs>
    <command-options>
      <filesonly />
      <dateformat>DD-MM-YYYY</dateformat>
      <fromdate>24-09-2008</fromdate>
      <todate>07-10-2008</todate>
      <timeformat>HH:MM:SS</timeformat>
      <fromtime>09:10:00</fromtime>
      <totime>14:00:00</totime>
      <detail />
      <inactive />
    </command-options>
    <command-arguments>
      <filespec>C:\\new1.txt</filespec>
    </command-arguments>
  </command-request>
</tsm-request>



The following figure shows the adapter response for the sample request:

Sample adapter response for the query-backup operation

<tsm-response>
  <metadata>
    <status>success</status>
    <count>1</count>
  </metadata>
  <commands-output>
    <command-output>
      <metadata>
        <command>dsmc query backup -filesonly -detail -inactive -dateformat=2 -        fromdate=24-09-2008 -todate=07-10-2008 -timeformat=1 -fromtime=09:10:00         -totime=14:00:00 C:\\new1.txt</command>
        <line-count>13</line-count>
        <execution-milliseconds>1968</execution-milliseconds>
        <exit-code>0</exit-code>
        <status>success</status>
      </metadata>
      <output>
        <line index="1">IBM Tivoli Storage Manager</line>
        <line index="2">Command Line Backup/Archive Client Interface</line>
        <line index="3">  Client Version 5, Release 5, Level 0.0  </line>
        <line index="4">  Client date/time: 07-10-2008 13:22:56</line>
        <line index="5">(c) Copyright by IBM Corporation and other(s) 1990, 2007.         All Rights Reserved.</line>
        <line index="6">Node Name: D-13096</line>
        <line index="7">Session established with server SERVER1:         Linux/i386</line>
        <line index="8">  Server Version 5, Release 5, Level 0.0</line>
        <line index="9">  Server date/time: 07-10-2008 13:20:39  Last access: 07-        10-2008 12:34:56</line>
        <line index="10">           Size        Backup Date                Mgmt         Class           A/I File</line>
        <line index="11">           ----        -----------                ------        ----           --- ----</line>
        <line index="12">            92  B  07-10-2008 12:34:56             DEFAULT         A  \\d-13096\c$\new1.txt</line>
        <line index="13">		Modified: 07-10-2008 12:00:47	Created: 07-10-2008         12:00:29</line>
      </output>
    </command-output>
  </commands-output>
</tsm-response>
Was this page helpful? Yes No Submitting... Thank you

Comments