TapeTrack Documentation

Because there is more to tape management than you ever realized

User Tools

Site Tools


cookbook:sync

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
cookbook:sync [2019/06/13 02:17] – [TMSS10Sync Implementation] Scott Cunliffecookbook:sync [2025/01/21 22:07] (current) – external edit 127.0.0.1
Line 2: Line 2:
  
 ===== TMSS10Sync Implementation ===== ===== TMSS10Sync Implementation =====
 +
 +The TapeTrack Sync uses, in its minimum format, uses an executable TMSS10Sync, an input file containing the information to synchronize and a definition file (ttidef) containing the information on how to read, or translate, the information in the input file.
 +
 +==== TTIDEF Definition File Explained ====
  
 Imagine a Customer going to a bank to deposit cash into their account, a common task for most people.  The problem for this customer is they only speak Spanish and the bank staff only speak English. Imagine a Customer going to a bank to deposit cash into their account, a common task for most people.  The problem for this customer is they only speak Spanish and the bank staff only speak English.
Line 7: Line 11:
 {{sync_no_translator.png}} {{sync_no_translator.png}}
  
-The solution to this problem is the implementation of a translator who speaks both languages.  The customer talks to the translator, who passes the information to the teller in English so the money can be paced into the correct account.+The solution to this problem is the implementation of a translator who speaks both languages.  The customer talks to the translator, who passes the information to the teller in English so the money can be placed into the correct account.
  
 {{sync_translator.png}} {{sync_translator.png}}
  
-This is similar the situation faced by TapeTrack Sync when importing information into the database. A text or CSV input file can contain Volume information in many formats so direct import is not possible in the raw format. +This is similar to the situation faced by TapeTrack Sync when importing information into the database. A text or CSV input file can contain Volume information in many formats so direct import is not possible in the raw format. 
  
 {{tmss10sync_no_translator.png}} {{tmss10sync_no_translator.png}}
Line 18: Line 22:
  
 {{tmss10sync_translator.png}} {{tmss10sync_translator.png}}
 +
 +==== Constructing a Definition File ====
 +
 +Using a text editor, such as Notepad, create a definition file.
 +This file:
 +  * Has a file extension of .ttidef
 +  * Should have a descriptive name, default.ttidef will load into Sync process if no parameter is set when TMSS10Sync is called.
 +
 +The first step to writing the definition file is to decide what information you wish to synchronize, or import, into the Tapetrack database.
 +
 +=== CSV Input File Format ===
 +
 +Sample CSV File - ''sample.csv'' \\
 +This file can be found in your Sync installation directory at TapeTrack\TapeTrack Sync\var\sample.csv
 +
 +<code>
 +GZB0001,LTO5,Full System Backup
 +GZB0002,LTO4,GL Backup
 +GZB0003,LTO2,Exchange Server Backup
 +GZB0004,LTO5,Full System Backup
 +GZB0005,LTO4,GL Backup
 +GZB0006,LTO2,Exchange Server Backup
 +GZB0007,LTO5,Full System Backup
 +GZB0008,LTO4,GL Backup
 +GZB0009,LTO2,Exchange Server Backup
 +GZB0010,LTO5,Full System Backup
 +</code>
 +
 +
 +In this comma delimited CSV file we can see the fields that we need to extract:
 +  * Volume-ID in column 1
 +  * Media-ID in column 2
 +  * Volume Description in column 3
 +
 +Missing from the CSV file is the Customer-IDand Media-ID, which will set directly from within the definition file.
 +
 +Lines in the definition file that start with #, or midline after the #, are comments for explanation and are not read by the Sync engine.
 +
 +Sample Definition File - default.ttidef \\
 +This file can be found in your Sync installation directory at TapeTrack\TapeTrack Sync\etc\sample.ttidef
 +
 +<code>
 +#
 +# Object Type: TapeTrack Sync Definition File                                                  
 +# Description: Sample minimal template                                       
 +#      System: TapeTrack                                                            
 +#    SecLevel: Proprietary                                                         
 +#   Copyright: (c) 2016 GazillaByte LLC                        
 +#
 +SetLiteral(CUSTOMER, "0001");         # Set the Customer-ID to a literal value of 0001
 +SetLiteral(MEDIA, "LTO");             # Set the Media-ID to a literal value of LTO
 +SetCSVDelimiter(",");                 # Instruct the parser that we have a CSV file and the file is delimited with commas
 +Extract(VOLUME, 1, 7, 0);             # Extract the Volume-ID from the 1st column of the CSV with a length of 7 bytes
 +Extract(USER1, 2, 10, 0);             # Extract a user field for translation
 +Extract(DESCRIPTION, 3, 40, 0);       # Extract the Description field
 +RemoveSpaces(DESCRIPTION);            # Remove any white space from the LHS of the description
 +#
 +# Add L suffixes to the Volume-ID based on Media Generation
 +#
 +AddTranslation2(VOLUME, USER1, "LTO1", "*L1");
 +AddTranslation2(VOLUME, USER1, "LTO2", "*L2");
 +AddTranslation2(VOLUME, USER1, "LTO3", "*L3");
 +AddTranslation2(VOLUME, USER1, "LTO4", "*L4");
 +AddTranslation2(VOLUME, USER1, "LTO5", "*L5");
 +AddTranslation2(VOLUME, USER1, "LTO6", "*L6");
 +AddTranslation2(VOLUME, USER1, "LTO7", "*L7");
 +</code>
 +
 +{{tag> cookbook}}
  
cookbook/sync.1560392250.txt.gz · Last modified: 2025/01/21 22:07 (external edit)