4. Querying the server

On starting the TSM CLI, no information about your current configuration settings or filestore is displayed. The following query commands illustrate typical command syntax and output.

4.1. Querying what files have been archived

The syntax for querying what files you have archived involves giving a file specification which is necessarily OS specific. Also, if an incorrect file specification is given it may appear that you have no archived files. Consequently, several worked examples are displayed below for both Windows and Linux environments.

** Linux **

  tsm> q ar /scratch/test1/ 
       Size  Archive Date - Time    File - Expires on - Description
       ----  -------------------    -------------------------------
  2,411,227  28-06-2002 10:51:36    /scratch/test1/j1.jpg Never project 01.1 28/06/2002
    760,632  28-06-2002 10:51:37    /scratch/test1/j2.jpg Never project 01.1 28/06/2002
      3,657  28-06-2002 10:51:37    /scratch/test1/join_actlog Never project 01.1 28/06/2002
    189,282  28-06-2002 10:51:37    /scratch/test1/j-hat.JPG Never project 01.1 28/06/2002
    229,080  28-06-2002 10:51:37    /scratch/test1/j-sidecar.JPG Never project 01.1 28/06/2002

  tsm> q ar /scratch
ANS1083E No files have previously been archived for '/scratch'

  tsm> q ar /scratch/        
       Size  Archive Date - Time    File - Expires on - Description
       ----  -------------------    -------------------------------
      1,536  28-06-2002 10:51:36    /scratch/test1 Never project 01.1 28/06/2002

  tsm> q ar /scratch/ -su=yes
       Size  Archive Date - Time    File - Expires on - Description
       ----  -------------------    -------------------------------
  2,411,227  28-06-2002 10:51:36    /scratch/test1/j1.jpg Never project 01.1 28/06/2002
    760,632  28-06-2002 10:51:37    /scratch/test1/j2.jpg Never project 01.1 28/06/2002
      3,657  28-06-2002 10:51:37    /scratch/test1/join_actlog Never project 01.1 28/06/2002
    189,282  28-06-2002 10:51:37    /scratch/test1/j-hat.JPG Never project 01.1 28/06/2002
    229,080  28-06-2002 10:51:37    /scratch/test1/j-sidecar.JPG Never project 01.1 28/06/2002

** Win ** 

  tsm> q ar c:  
ANS1083E No files have previously been archived for 'C:'

  tsm> q ar "C:\My Documents\"
       Size  Archive Date - Time    File - Expires on - Description
       ----  -------------------    -------------------------------
          0  26-04-2002 14:33:27    \\cles.oucs\c$\My Documents Never test jpgs
          0  26-04-2002 14:33:32    \\cles.oucs\c$\My Documents Never test jpgs

  tsm> q ar "C:\My Documents\*"
       Size  Archive Date - Time    File - Expires on - Description
       ----  -------------------    -------------------------------
          0  26-04-2002 14:33:27    \\cles.oucs\c$\My Documents Never test jpgs
          0  26-04-2002 14:33:32    \\cles.oucs\c$\My Documents Never test jpgs

  tsm> q ar "C:\My Documents\Mac"
       Size  Archive Date - Time    File - Expires on - Description
       ----  -------------------    -------------------------------
          0  26-04-2002 14:33:27    \\cles.oucs\c$\My Documents\Mac Never test jpgs

  tsm> q ar "C:\My Documents\Mac\"
       Size  Archive Date - Time    File - Expires on - Description
       ----  -------------------    -------------------------------
          0  26-04-2002 14:33:27    \\cles.oucs\c$\My Documents\Mac Never test jpgs
    786,021  26-04-2002 14:33:27    \\cles.oucs\c$\My Documents\Mac\macjpgs.zip Never test jpgs
    755,690  26-04-2002 14:33:27    \\cles.oucs\c$\My Documents\win\macpcts.zip Never test jpgs


  tsm> q ar "C:\My Documents\" -su=yes
       Size  Archive Date - Time    File - Expires on - Description
       ----  -------------------    -------------------------------
    786,021  26-04-2002 14:33:27    \\cles.oucs\c$\My Documents\Mac\macjpgs.zip Never test jpgs
    755,690  26-04-2002 14:33:27    \\cles.oucs\c$\My Documents\win\macpcts.zip Never test jpgs
     38,284  26-04-2002 14:33:32    \\cles.oucs\c$\My Documents\win\wzip00.jpg Never test jpgs
     44,041  26-04-2002 14:33:32    \\cles.oucs\c$\My Documents\win\wzip01.jpg Never test jpgs

  

Note that you need to terminate a directory path with a trailing slash "/" (Linux) or "\" (Windows) in order to get a list of files archived in that folder. If you omit the trailing slash, then TSM will return just the names of directories in that path archived. If you add a wildcard star to the end of a path, TSM will return those files and directories archived immediately below the path given in the query.

Essentially, to get a full listing of all files archived under a top-level directory, terminate the path with a trailing slash and add the -su=yes which is shortform for subdir=yes and allows the query to recursively search for archived files from all subdirectories under the path.

Note that on both Windows and Linux platforms, path names with spaces need to be fully enclosed in quotes. Note also that the Windows client lists the directory in UNC format. This format can also be used for the file specification in the query.

Up: Contents Previous: 3. Accessing Help Next: 5. Archiving your data