TapeTrack Documentation

Because there is more to tape management than you ever realized

User Tools

Site Tools


technote:add_remove_flags_by_last_read

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
technote:add_remove_flags_by_last_read [2021/07/30 00:30] – [Input file - Volumes.csv] Scott Cunliffetechnote:add_remove_flags_by_last_read [2025/01/21 22:07] (current) – external edit 127.0.0.1
Line 1: Line 1:
-====== Add Remove Flags Based Off Last Read Time ======+====== Add Or Remove Flags Based Off Last Read Time ======
  
-Add or Remove Flags based off last read time of Volumes using TMSS10ModifyFlags and a config file.+Add or Remove [[common:volume_flags|Flags]] based off last read time of [[object:volume|Volumes]] using [[cli:tmss10modifyflags|TMSS10ModifyFlags]] and a config file.
  
-The purpose of this method allows you to lock any Volumes in your Library that have been recalled for data restoration and then automatically remove the move lock once the last read time passes a set number of days.  The Sync can then place the Volumes in a move back to the offsite vault until the data expires.+One purpose of this method allows you to lock any [[object:volume|Volumes]] in your Library that have been recalled for data restoration and then automatically remove the move lock once the last read time passes a set number of days.  The Sync can then place the [[object:volume|Volumes]] in a move back to the Offsite Vault until the data expires.
  
-The process involves TMSS10ModifyFlags loading an input file, using a definition file, to extract the Volume-ID's.  The Volume-ID's are then filtered using the configuration file and adding any qualifying Volumes to a scan file.+The process involves [[cli:tmss10modifyflags|TMSS10ModifyFlags]] loading an input file, using a definition file, to extract the [[object:volume|Volume-ID's]].  The [[object:volume|Volume-ID's]] are then filtered using the configuration file and adding any qualifying [[object:volume|Volumes]] to a scan file.
  
-The scan file is then processed, adding or removing the defined Flags against the scan list Volumes.+The scan file is then processed, adding or removing the defined [[common:volume_flags|Flags]] against the scan list [[object:volume|Volumes]].
  
 ===== Sample Files ===== ===== Sample Files =====
Line 29: Line 29:
  
  
-The definition file provides the information on how to extract the Volume-ID from the input file into the barcode field, as well as setting the Customer-ID and Media-ID.+The definition file provides the information on how to extract the [[object:volume|Volume-ID]] from the input file into the barcode field, as well as setting the [[object:customer|Customer-ID]] and [[object:media|Media-ID]].
  
   # Set input file (use full path if not in current directory)   # Set input file (use full path if not in current directory)
Line 50: Line 50:
  
  
-Configuration file sets definition file for translating and extracting Volume-ID's and filters input by Customer-ID (0002), Media-ID (LTO).  The last read time is then compared to the lastreadtime filter, if the last read time is 30 or more days ago, the Volume is added to the scan file, if not it is discarded.+Configuration file sets definition file for translating and extracting [[object:volume|Volume-ID's]] and filters input by [[object:customer|Customer-ID]] (0002), [[object:media|Media-ID]] (LTO).  The last read time is then compared to the lastreadtime filter, if the last read time is 30 or more days ago, the [[object:volume|Volume]] is added to the scan file, if not it is discarded.
      
   traversal =   traversal =
Line 85: Line 85:
  
  
-Run TMSS10ModifyFlags to remove lock flag from all Volumes in the input file with a last read date of 30 or more days ago.  Using the Volume filter (-V) to only read in Customer-ID 0002 to save processing time by avoiding reading in all other Customer-ID's.  Output from the process being written to stdout.txt and stderr.txt.  The output files can written to any directory by using full directory paths.+Run [[cli:tmss10modifyflags|TMSS10ModifyFlags]] to remove lock flag from all [[object:volume|Volumes]] in the input file with a last read date of 30 or more days ago.  Using the Volume filter (-V) to only read in [[object:customer|Customer-ID]] 0002 to save processing time by avoiding reading in all other [[object:customer|Customer-ID's]].  Output from the process being written to modify_flags_stdout.txt and modify_flags_stderr.txt.  The output files can written to any directory by using full directory paths.
  
   TMSS10ModifyFlags -S user:-password@server -F "!l" -c last_read.cfg -V 0002.LTO.* > modify_flags_stdout.txt 2> modify_flags_stderr.txt   TMSS10ModifyFlags -S user:-password@server -F "!l" -c last_read.cfg -V 0002.LTO.* > modify_flags_stdout.txt 2> modify_flags_stderr.txt
Line 97: Line 97:
              System: TapeTrack              System: TapeTrack
  Report Description: Scan-File Load Report  Report Description: Scan-File Load Report
-    Production Time: Friday, July 30, 2021 - 10:26:02 (AUS Eastern Standard Time)+    Production Time: Friday, July 30, 2021 - 10:36:51 (AUS Eastern Standard Time)
        Report Width: 149 bytes        Report Width: 149 bytes
  
Line 116: Line 116:
              System: TapeTrack              System: TapeTrack
  Report Description: Flag Modification Report  Report Description: Flag Modification Report
-    Production Time: Friday, July 30, 2021 - 10:26:02 (AUS Eastern Standard Time)+    Production Time: Friday, July 30, 2021 - 10:36:51 (AUS Eastern Standard Time)
        Report Width: 156 bytes        Report Width: 156 bytes
  
  Seq.   Barcode              Old Flags                        New Flags                        Message                                                        Seq.   Barcode              Old Flags                        New Flags                        Message                                                      
  ------ -------------------- -------------------------------- -------------------------------- ------------------------------------------------------------   ------ -------------------- -------------------------------- -------------------------------- ------------------------------------------------------------ 
-      1 US02.LTO.100001L5    Cln                              Cn                               Request OK                                                    +      1 US02.LTO.100006L5    ClMn                             CMn                              Request OK                                                    
-      2 US02.LTO.100002L5    Cln                              Cn                               Request OK                                                    +      2 US02.LTO.100007L5    ClMn                             CMn                              Request OK                                                    
-      3 US02.LTO.100003L5    Cln                              Cn                               Request OK                                                    +      3 US02.LTO.100008L5    ClMn                             CMn                              Request OK                                                    
-      4 US02.LTO.100004L5    Cln                              Cn                               Request OK                                                    +      4 US02.LTO.100009L5    ClMn                             CMn                              Request OK                                                    
-      5 US02.LTO.100005L5    Cln                              Cn                               Request OK                                                    +      5 US02.LTO.100010L5    ClMn                             CMn                              Request OK                                                   
-      6 US02.LTO.100006L5    Cln                              Cn                               Request OK                                                    +
-      7 US02.LTO.100007L5    Cln                              Cn                               Request OK                                                    +
-      8 US02.LTO.100008L5    Cln                              Cn                               Request OK                                                    +
-      9 US02.LTO.100009L5    Cln                              Cn                               Request OK                                                    +
-     10 US02.LTO.100010L5    Cln                              Cn                               Request OK                                                   +
  ------ -------------------- -------------------------------- -------------------------------- ------------------------------------------------------------   ------ -------------------- -------------------------------- -------------------------------- ------------------------------------------------------------ 
  
 </code> </code>
  
-modify_flags_stderr.txt 
  
-<code> 
-ZBT001N-10:22:48 TMSS10ModifyFlags (c) GazillaByte 1998-2021 
-ZBT002N-10:22:48 Compiled Jul 14 2021 at 16:17:38 
-ZBT010I-10:22:48 this program allows you to set or unset volume flags 
-ZBT006N-10:22:48 Running Under Windows 10 (build 19043 10.00) on platform x64 
-ZBT000N-10:22:48 Host is Little Endian 
-ZBT000N-10:22:48 Host is ASCII 
-ZBT000N-10:22:48 Binary is 64 bit 
-ZBT000N-10:22:48 Current Working Directory is C:\Users\GazillaByte 
-ZBT004N-10:22:48 Today is Friday, July 30, 2021 
-ZBT005N-10:22:48 Running on GazillaByte 
-ZBT006N-10:22:48 Process ID 12376 
-ZBT000N-10:22:48 Parsing and validating command arguments 
-ZBT001N-10:22:48 Server Interpreted as: Server(localhost) Port(5000) User(tapemaster) Password(******) 
-ZBT002N-10:22:48 Program Options: 
-ZBT002N-10:22:48 (F) New Flags=!l 
-ZBT002N-10:22:48 (S) Server=<VALUE HIDDEN> 
-ZBT002N-10:22:48 (V) Volume Filter=US02.LTO.* 
-ZBT002N-10:22:48 (c) Configuration File=last_read.cfg 
-ZBT000N-10:22:48 Arguments parsed and validated with 0 errors 
-ZBT000N-10:22:48 Reading Config File last_read.cfg 
-ZBT000I-10:22:48 Flags to set:  
-ZBT000I-10:22:48 Flags to unset: l 
-ZBT000N-10:22:48 Checking for environment variable TMSSSERVERPROXY 
-ZBT000N-10:22:48 Connection to server (127.0.0.1) successful 
-ZBT000N-10:22:48 Logging on to TapeTrack Server 
-ZBT000N-10:22:48 Registering Client at MACID(1c:69:7a:02:49:71:00:00) Result(Request OK) 
-ZBT000N-10:22:48 Last Logon was at Friday, July 30, 2021 - 10:21:50 from 127.0.0.1 (GazillaByte) 
-ZBT000N-10:22:48 Welcome to Server: Production 
-ZBT000N-10:22:48 Loading Scan List from definition file 
-ZBT001N-10:22:48 Opening Configuration File file: default.ttidef 
-ZBT001N-10:22:48 File Information for: Configuration File 
-ZBT001N-10:22:48 File Size: 132 
-ZBT001N-10:22:48 File Created: Thursday, July 15, 2021 - 11:58:26 
-ZBT001N-10:22:48 File Last Accessed: Friday, July 30, 2021 - 10:21:50 
-ZBT001N-10:22:48 Closing file: Configuration File 
-ZBT001N-10:22:48 Opening Import File file: VOLUMES.CSV 
-ZBT001N-10:22:48 File Information for: Import File 
-ZBT001N-10:22:48 File Size: 350 
-ZBT001N-10:22:48 File Created: Thursday, July 15, 2021 - 11:55:58 
-ZBT001N-10:22:48 File Last Accessed: Friday, July 30, 2021 - 10:22:26 
-ZBT001N-10:22:48 Closing file: Import File 
-ZBT000N-10:22:48 Scan-File load is now complete. 10 records loaded 
-ZBT000I-10:22:48 Initializaing Attribute Control: Index[0] 
-ZBT001N-10:22:48 Volume filter interpreted as: Customer(US02) Media(LTO) Volume(*) Repository(*) Flags() 
-ZBT000N-10:22:48 Listing Customers 
-ZBT000N-10:22:48 Customer List successful: Customers(24) Excluded(0) 
-ZBT000N-10:22:48 Processing Customer: US02-Los Angeles Data Center (1602/606) 
-ZBT000N-10:22:48 Listing Media 
-ZBT000N-10:22:48 Media List successful: Media(2) Excluded(0) 
-ZBT000N-10:22:48 Processing Media: LTO-LTO Cartridge 
-ZBT000N-10:22:48 Listing Volumes 
-ZBT000N-10:22:48 Volume List successful: Volumes(1597) Excluded(0) 
-ZBT000N-10:22:48 Volume (US02.LTO.100001L5) updated OK 
-ZBT000N-10:22:48 Volume (US02.LTO.100002L5) updated OK 
-ZBT000N-10:22:48 Volume (US02.LTO.100003L5) updated OK 
-ZBT000N-10:22:48 Volume (US02.LTO.100004L5) updated OK 
-ZBT000N-10:22:48 Volume (US02.LTO.100005L5) updated OK 
-ZBT000N-10:22:48 Volume (US02.LTO.100006L5) updated OK 
-ZBT000N-10:22:48 Volume (US02.LTO.100007L5) updated OK 
-ZBT000N-10:22:48 Volume (US02.LTO.100008L5) updated OK 
-ZBT000N-10:22:48 Volume (US02.LTO.100009L5) updated OK 
-ZBT000N-10:22:48 Volume (US02.LTO.100010L5) updated OK 
-ZBT000N-10:22:48 Closing connection to TapeTrack Server 
-ZBT000N-10:22:48 Session Statistics: 
-ZBT000N-10:22:48 Seconds Connected: 0 
-ZBT000N-10:22:48 Queries Completed: 36 
-ZBT000N-10:22:48        Bytes Sent: 3,088 
-ZBT000N-10:22:48    Bytes Received: 38,832 
-ZBT000N-10:22:48 - 
-ZBT000N-10:22:48 Return Code Statistics ------------------------------------------------ 
-ZBT000N-10:22:48 Message                                                           Total 
-ZBT000N-10:22:48 Request OK                                                           36 
-ZBT000N-10:22:48 ----------------------------------------------------------------------- 
-ZBT000N-10:22:48 - 
-ZBT900N-10:22:48 Program Complete 
-ZBT901N-10:22:48 Elapsed time 0 minutes and 0 seconds 
-ZBT991N-10:22:48 CRC values for this session: 0x7a9bacb (0x4c566fb9) 
-ZBT992N-10:22:48 Number of records written: 76 
-ZBT993N-10:22:48 Number of bytes written: 4,236 
-ZBT999N-10:22:48 Program ended 
- 
-</code> 
  
 {{tag> technote config cli report}} {{tag> technote config cli report}}
  
technote/add_remove_flags_by_last_read.1627605038.txt.gz · Last modified: 2025/01/21 22:07 (external edit)