TapeTrack Documentation

Because there is more to tape management than you ever realized

User Tools

Site Tools


cli:list_added_at_repository

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
cli:list_added_at_repository [2018/01/22 23:24] – [Configuration File] Scott Cunliffecli:list_added_at_repository [2025/01/21 22:07] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ======  Volumes Added Within A Defined Date Range, Currently Located In A Selected 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.  +Listing all [[object:volume|Volumes]] added to TapeTrack within a defined range of dates and currently located within a selected [[object:repository|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.+You must first extract an inventory listing of all [[object:volume|Volumes]] added between the specified range of dates.  Then use that file to compare against a listing of all [[object:volume|Volumes]] located in the selected [[object:repository|Repository]] and extract all [[object:volume|Volumes]] that appear in both Inventories and export to file.
  
-===== Extracting An Inventory Of Volumes Added Within A Defined Date Range =====+The comparison of the [[object:volume|Volumes]] within the files also requires the use of a Configuration file and a Definition file to extract the data in the correct format. 
  
-Using the command line program [[TMSS10ListHistory]], along with the attributes: +{{cli_date_range_repository.png}} 
-  * -S user:-password@server for logon access  +===== Extracting Volumes Added Within A Defined Date Range =====
-  * -R "YYYY-MM-DD:YYYY-MM-DD" to specify the date range +
-  * -t "*Added*" to only extract volume added records +
-  * -V "CUST.MEDIA.*" to limit customer and media types extracted if required+
  
-Output from this process needs to be captured and written to file using stdout.+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 [[object:volume|Volume]] Added records 
 +  * ''-V "CUST.MEDIA.*"'': Limit [[object:customer|Customer]] and [[object:media|Media Types]] extracted if required
  
-To extract all volumes added between the start of the year 2000 and the end of 2010 and write to file historyOut.txt+Output from this process is captured and written to file using stdout.
  
-<code>+To extract all [[object:volume|Volumes]] added between the start of the year 2000 and the end of 2010 and write to file ''historyOut.txt'' 
 + 
 +<code plain;>
 TMSS10ListHistory -S user:-password@server -R "2000-01-01:2010-12-31" -t "*Added*" -V "*.*.*" > historyOut.txt TMSS10ListHistory -S user:-password@server -R "2000-01-01:2010-12-31" -t "*Added*" -V "*.*.*" > historyOut.txt
 </code> </code>
Line 24: Line 27:
 ===== Configuration File ===== ===== 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 configuration file is used for traversal of the history ([[object:volume|Volumes]] added) file for comparison of [[object:volume|Volumes]]  currently in the selected [[object:repository|Repository]].
  
-The following example instructs TapeTrack to compare each volume ID to the scanfile, if it is present include it in, otherwise skip it and move to the next volume.+The following example instructs TapeTrack to compare each [[object:volume|Volume-ID]] to the Scanfile, if it is present include it in the output file, otherwise skip it and move to the next [[object:volume|Volume]].
  
-<code>+<code plain;>
 traversal  traversal 
 { {
Line 59: Line 62:
 }; };
 </code> </code>
 +
 +===== Definition File =====
 +
 +The [[concepts:definition_file|Definition File]] (default.ttidef) is used to instruct TapeTrack how the data is formatted in the extracted file.
 +
 +<code plain;>
 +# 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, " -*");
 +</code>
 +
 +===== Inventory Of Volumes Added Within A Defined Date Range Located In A Specified Repository =====
 +
 +Using the list of [[object:volume|Volumes]] added between the defined date range, we now compare that list to the [[object:volume|Volumes]] located at the specified [[object:repository|Repository]] and output the [[object:volume|Volumes]] to file (inventory_out.txt).
 +
 +<code plain;>
 +TMSS10Inventory -S tapemaster:-@localhost -V "*.*.*@OFFS" -c "inventory.cfg" > inventory_out.txt 2> inventory_err.txt
 +</code>
 +
 +or if you prefer CSV output with [[concepts:unqualified_barcode|Unqualified]] [[object:volume|Volume-ID's]], set the [[variable:start|Environmental Variables]] [[variable:tmssreportformat|TMSSREPORTFORMAT]] and [[variable:tmssunqualifiedvolume|TMSSUNQUALIFIEDVOLUME]].
 +
 +<code plain;>
 +set TMSSUNQUALIFIEDVOLUME=true
 +set TMSSREPORTFORMAT=CSV 
 +
 +TMSS10Inventory -S tapemaster:-@localhost -V "*.*.*@OFFS" -c "inventory.cfg" > inventory_out.csv 2> inventory_err.txt
 +</code>
 +
  
cli/list_added_at_repository.1516663444.txt.gz · Last modified: 2025/01/21 22:07 (external edit)