TapeTrack Documentation

Because there is more to tape management than you ever realized

User Tools

Site Tools


cli:tmss10batchloader

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:tmss10batchloader [2019/02/25 00:08] Scott Cunliffecli:tmss10batchloader [2025/01/21 22:07] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== TMSS10BatchLoader ====== ====== TMSS10BatchLoader ======
 +
 +TMSS10BatchLoader creates [[object:customer|Customer]], [[object:media|Media]] and [[object:repository|Repositories]] by loading a Configuration file into the TapeTrack Database.
  
 ===== Synopsis ===== ===== Synopsis =====
  
-''TMSS10BatchLeader [-c configuration file] [-S logonstring]'' +''TMSS10BatchLoader [-c configuration file] [-S logonstring]''
- +
-===== Description ===== +
- +
-Creates Customer, Media and Repositories by loading a configuration file into the TapeTrack Database.+
  
 ===== Options ===== ===== Options =====
Line 13: Line 11:
   * ''-c'' The config file argument specifies the path to the Batch Configuration File.   * ''-c'' The config file argument specifies the path to the Batch Configuration File.
   * ''-S'' Logon string argument sets the [[cli:server_argument|Server logon information]].   * ''-S'' Logon string argument sets the [[cli:server_argument|Server logon information]].
 +
 +
 +{{page>cli:fi}}
 +===== Editable Fields =====
 +
 +  * [[object:customer|Customer-ID]]
 +  * [[object:customer|Customer Description]]
 +  * [[object:media|Media-ID]]
 +  * [[object:media|Media Description]]
 +  * [[object:repository|Repository-ID]]
 +  * [[object:repository|Repository Description]]
 +  * Repository Icon
 +    * {{:master:tapemaster_repository_rack.png}} Rack (value = 0)
 +    * {{:master:tapemaster_repository_transport.png}} Transport (value = 1)
 +    * {{:master:tapemaster_repository_vault.png}} Vault (value = 2)
 +    * {{:master:tapemaster_repository_library.png}} Library (value = 3)
 +    * {{:master:tapemaster_repository_legal_hold.png}} Legal Hold (value = 4)
 +    * {{:master:tapemaster_repository_disaster_recovery.png}} Disaster Recovery (value = 5)
 +    * {{:master:tapemaster_repository_destruction.png}} Destruction (value = 6)  
 +    * {{:master:tapemaster_repository_ordered.png}} Ordered (value = 7) 
 +    * {{:master:tapemaster_repository_scratch.png}} Scratch (value = 8)
 +  * [[options:repository:next_repository|Next Repository]]
 +  * [[master:media#options_tab|Auto Container flag]]
 +
  
 ==== Technical Support ==== ==== Technical Support ====
  
-The TapeTrack Software is commercially supported by a full time help desk staff. If you are experiencing problems or want some advice on how to configure or use the product please see the [[common:support_details|Accessing Technical Support]] page.+The TapeTrack Software is commercially supported by a full time help desk staff.  
 + 
 +If you are experiencing problems or want some advice on how to configure or use the product please see the [[common:support_details|Accessing Technical Support]] page.
  
 ==== Exit Statuses ==== ==== Exit Statuses ====
Line 26: Line 50:
  
 ==== Files ==== ==== Files ====
 +
 +**stderr:** Diagnostic messages.
  
 ===== Example ===== ===== Example =====
-=== Headline === 
  
-Configuration file to load to create two Customers with duplicate attributes +=== Configuration File ===
-   * Customer ID: 0001, Customer Description: ACME Computers +
-   * Customer ID: 0002, Customer Description: Bond Corporation  +
-with two media types  +
-  * Media ID: LTO, Media Description: LTO Cartridge +
-  * Media ID: 3490, Media Description: IBM 3490 Cartridge.   +
-and two repositories  +
-  * Repository ID: LIBR, Repository Description: Library, Repository Type: 1, Next Repository: OFFS  +
-  * Repository ID: OFFS, Repository Description: Iron Mountain, Repository Type: 2 and Next Repository: LIBR.+
  
-<sxh> +Configuration file to create two [[object:customer|Customers]] with Attributes:
-setup= +
-+
-   customers= +
-   ( +
-      {  +
-          id="0001"; description="ACME Computers";+
  
-          media= +Customer 0001 
-          ( +  * [[object:customer|Customer-ID]]: US01, [[object:customer|Customer Description]]: New York Data Center. 
-             {  +  * [[object:media|Media-ID]]: LTO, [[object:media|Media Description]]: LTO Cartridge
-                 id="LTO"; description="LTO Cartridge";+  * [[object:repository|Repository-ID]]: LIBR, [[object:repository|Repository Description]]: Library, [[options:repository:type|Repository Type]]: 1, [[options:repository:next_repository|Next Repository]]: OFFS. 
 +  * [[object:repository|Repository-ID]]: OFFS, [[object:repository|Repository Description]]: Iron Mountain, [[options:repository:type|Repository Type]]: 2. 
 +  * [[object:repository|Repository-ID]]: DEST, [[object:repository|Repository Description]]: Destroyed, [[options:repository:type|Repository Type]]: 6.  
 +  * [[object:repository|Repository-ID]]: HOLD, [[object:repository|Repository Description]]: Legal Hold, [[options:repository:type|Repository Type]]: 4 .
  
-                 repositories= +Customer 0002 
-                 ( +  * [[object:customer|Customer-ID]]: US02, [[object:customer|Customer Description]]: Los Angeles Data Center.  
-                     { id="LIBR"; description="Library"; type=1; }+  * [[object:media|Media-ID]]: 3490, [[object:media|Media Description]]: IBM 3490 Cartridge. 
-                     { id="OFFS"; description="Iron Mountain"; type=2; } +  * [[object:repository|Repository-ID]]: LIBR, [[object:repository|Repository Description]]: Library, [[options:repository:type|Repository Type]]: 1, [[options:repository:next_repository|Next Repository]]: OFFS. 
-                 ) +  * [[object:repository|Repository-ID]]: OFFS, [[object:repository|Repository Description]]: Iron Mountain, [[options:repository:type|Repository Type]]: and [[options:repository:next_repository|Next Repository]]: LIBR.
-             }, +
-             {  +
-                 id="3490"; description="IBM 3490 Cartridge";+
  
-                 repositories= +{{:cli:master.txt|Download Sample Configuration file.}}
-                 ( +
-                     id="LIBR"; description="Library"; type=1; next="OFFS"; }, +
-                     id="OFFS"; description="Iron Mountain"; type=2; next="LIBR"; } +
-                 ) +
-                 +
-          ) +
-      }, +
-      {  +
-          id="0002"; description="Bond Corporation";+
  
-          media= 
-          ( 
-              
-                 id="LTO"; description="LTO Cartridge"; 
  
-                 repositories= 
-                 ( 
-                     { id="LIBR"; description="Library"; type=1; }, 
-                     { id="OFFS"; description="Iron Mountain"; type=2; } 
-                 ) 
-             }, 
-              
-                 id="3490"; description="IBM 3490 Cartridge"; 
  
-                 repositories=+<code> 
 +  setup= 
 +  { 
 +     customers= 
 +     ( 
 +        {  
 +            id="US01"; description="New York Data Center"; 
 +   
 +            media= 
 +            ( 
 +               {  
 +                   id="LTO"; description="LTO Cartridge"; 
 +   
 +                   repositories=
                  (                  (
-                     { id="LIBR"; description="Library"; type=1; }, +                       { id="LIBR"; description="Library"; type=3; next="OFFS"; }, 
-                     { id="OFFS"; description="Iron Mountain"; type=2; } +                       { id="OFFS"; description="Iron Mountain"; type=2; next="LIBR"; }, 
-                 +                       { id="DEST"; description="Destroyed"; type=6; }, 
-             }     +                       { id="HOLD"; description="Legal hold"; type=4; } 
-          +                   ) 
-      +               }, 
-   ); +               {  
-}; +                   id="3490"; description="IBM 3490 Cartridge"; 
-</sxh>+   
 +                   repositories= 
 +                   ( 
 +                       { id="LIBR"; description="Library"; type=3; next="OFFS"; }, 
 +                       { id="OFFS"; description="Iron Mountain"; type=2; next="LIBR";
 +                   ) 
 +                   
 +            ) 
 +        }, 
 +        {  
 +            id="US02"; description="Los Angeles Data Center"; 
 +   
 +            media= 
 +            ( 
 +               {  
 +                   id="LTO"; description="LTO Cartridge"; 
 +   
 +                   repositories= 
 +                   ( 
 +                       { id="LIBR"; description="Library"; type=3; }, 
 +                       { id="OFFS"; description="Iron Mountain"; type=2; } 
 +                   ) 
 +               }, 
 +               {  
 +                   id="3490"; description="IBM 3490 Cartridge"; 
 +   
 +                   repositories= 
 +                   ( 
 +                       { id="LIBR"; description="Library"; type=3; }, 
 +                       { id="OFFS"; description="Iron Mountain"; type=2; } 
 +                   
 +               }     
 +            
 +        
 +     ); 
 +  }; 
 +</code>
  
  
 === Command line syntax === === Command line syntax ===
  
-<sxh>TMSS10BatchLoader -S user:-password@localhost -c master.cfg</sxh>+  TMSS10BatchLoader -S user:-password@localhost -c master.cfg  
 + 
 +=== Output Results === 
 + 
 +{{tmss10batchloder_output.png}} 
 + 
 + 
 +---- 
 + 
 +=== Configuration Files - Minimising Duplicate Code === 
 + 
 +When creating multiple [[object:customer|Customers]] with identical [[object:media|Media Types]] and/or [[object:repository|Repositories]] it is possible to create a configuration file with these Attributes and include it in the master configuration file to save duplication of code blocks. 
 + 
 +To create two customers, US01 and US02, with: 
 +  * [[object:media|Media-ID]]: LTO, [[object:media|Media Description]]: LTO Cartridge. 
 +  * [[object:media|Media-ID]]: 3490, [[object:media|Media Description]]: IBM 3490 Cartridge. 
 +  * [[object:repository|Repository-ID]]: LIBR, [[object:repository|Repository Description]]: Library, [[options:repository:type|Repository Type]]: 1, [[options:repository:next_repository|Next Repository]]: OFFS. 
 +  * [[object:repository|Repository-ID]]: OFFS, [[object:repository|Repository Description]]: Iron Mountain, [[options:repository:type|Repository Type]]: 2 and [[options:repository:next_repository|Next Repository]]: LIBR. 
 + 
 +<note tip>A configuration file may “include” the contents of another file using an include directive.  
 + 
 +This directive has the effect of in-lining the contents of the named file at the point of inclusion. 
 + 
 +An include directive must appear on its own line in the input. It has the form: 
 + 
 +@include "filename" 
 + 
 +Any backslashes or double quotes in the filename must be escaped as ‘\\’ and ‘\"’, respectively.</note> 
 + 
 +=== Configuration Files === 
 + 
 +== master.cfg == 
 + 
 +  
 +  setup= 
 +  { 
 +     customers= 
 +     ( 
 +        {  
 +            id="US01"; description="New York Data Center"; 
 +            @include "include.cfg"     
 +        }, 
 +        {  
 +            id="US02"; description="Los Angeles Data Center"; 
 +            @include "include.cfg"   
 +        } 
 +     ); 
 +  }; 
 + 
 + 
 +== include.cfg == 
 + 
 + 
 +            media= 
 +            ( 
 +               {  
 +                   id="LTO"; description="LTO Cartridge"; 
 +   
 +                   repositories= 
 +                   ( 
 +                       { id="LIBR"; description="Library"; type=3; next="OFFS"; }, 
 +                       { id="OFFS"; description="Iron Mountain"; type=2; next="LIBR";
 +                   ) 
 +               }, 
 +               {  
 +                   id="3490"; description="IBM 3490 Cartridge"; 
 +   
 +                   repositories= 
 +                   ( 
 +                       { id="LIBR"; description="Library"; type=3; next="OFFS"; }, 
 +                       { id="OFFS"; description="Iron Mountain"; type=2; next="LIBR";
 +                   ) 
 +                   
 +            ) 
 + 
 + 
 + 
 + 
 +=== Command line syntax === 
 + 
 +  TMSS10BatchLoader -S user:-password@localhost -c master.cfg  
 + 
 +=== Output Results === 
 +{{cli:tmss10batchloder.output_include.png}} 
 + 
 + 
 +--> Changelog 
 +[filterrss http://www.tapetrack.com/cgi/changelog.cgi?module=TMSS10BatchLoader] 
 +<--
  
cli/tmss10batchloader.1551053304.txt.gz · Last modified: 2025/01/21 22:07 (external edit)