TapeTrack Documentation

Because there is more to tape management than you ever realized

User Tools

Site Tools


cli:list_added_at_repository

Volumes Added Within A Defined Date Range, Currently Located In A Selected Repository

Listing all Volumes added to TapeTrack within a defined range of dates and currently located within a selected Repository is a two-step process.

You must first extract an inventory listing of all Volumes added between the specified range of dates. Then use that file to compare against a listing of all Volumes located in the selected Repository and extract all Volumes that appear in both Inventories and export to file.

The comparison of the Volumes within the files also requires the use of a Configuration file and a Definition file to extract the data in the correct format.

Extracting Volumes Added Within A Defined Date Range

Using the command line program TMSS10ListHistory, along with the Attributes:

  • -S user:-password@server: Logon access
  • -R “YYYY-MM-DD:YYYY-MM-DD”: Specify the date range required.
  • -t “*Added*”: Extract only Volume Added records
  • -V “CUST.MEDIA.*”: Limit Customer and Media Types extracted if required

Output from this process is captured and written to file using stdout.

To extract all Volumes added between the start of the year 2000 and the end of 2010 and write to file historyOut.txt

TMSS10ListHistory -S user:-password@server -R "2000-01-01:2010-12-31" -t "*Added*" -V "*.*.*" > historyOut.txt

Configuration File

The configuration file is used for traversal of the history (Volumes added) file for comparison of Volumes currently in the selected Repository.

The following example instructs TapeTrack to compare each Volume-ID to the Scanfile, if it is present include it in the output file, otherwise skip it and move to the next Volume.

traversal 
{
   scanfile= { file="scanfile.ttidef"; };
   customer =
   (
      {
         id="*";
         media =
         (
            {
               id="*";
 
               volume =
               (
                   {
                      id="*";
                      scanfile = true;
                      skip=false;
                   },
                   {
                      id="*";
                      skip=true;
                   }
               );
            }
         );
      }
   );
};

Definition File

The Definition File (default.ttidef) is used to instruct TapeTrack how the data is formatted in the extracted file.

# input file for Volume comparison (TMSS10ListHistory output)
SetFile("historyOut.txt");
 
# extract Volume-ID
Extract(BARCODE, 1, 15, 0);
 
# skip header (9 lines)
SetHeaderCount(9); 
 
# exclude any line starting with -
AddString(Exclusion, 0, " -*");

Inventory Of Volumes Added Within A Defined Date Range Located In A Specified Repository

Using the list of Volumes added between the defined date range, we now compare that list to the Volumes located at the specified Repository and output the Volumes to file (inventory_out.txt).

TMSS10Inventory -S tapemaster:-@localhost -V "*.*.*@OFFS" -c "inventory.cfg" > inventory_out.txt 2> inventory_err.txt

or if you prefer CSV output with Unqualified Volume-ID's, set the Environmental Variables TMSSREPORTFORMAT and TMSSUNQUALIFIEDVOLUME.

set TMSSUNQUALIFIEDVOLUME=true
set TMSSREPORTFORMAT=CSV 
 
TMSS10Inventory -S tapemaster:-@localhost -V "*.*.*@OFFS" -c "inventory.cfg" > inventory_out.csv 2> inventory_err.txt
cli/list_added_at_repository.txt · Last modified: 2021/07/22 01:29 by scunliffe