cookbook:sync
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
cookbook:sync [2019/06/13 02:18] – Scott Cunliffe | cookbook: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 ==== | ==== TTIDEF Definition File Explained ==== | ||
Line 9: | 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 solution to this problem is the implementation of a translator who speaks both languages. |
{{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 |
{{tmss10sync_no_translator.png}} | {{tmss10sync_no_translator.png}} | ||
Line 20: | 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, | ||
+ | |||
+ | === CSV Input File Format === | ||
+ | |||
+ | Sample CSV File - '' | ||
+ | This file can be found in your Sync installation directory at TapeTrack\TapeTrack Sync\var\sample.csv | ||
+ | |||
+ | < | ||
+ | GZB0001, | ||
+ | GZB0002, | ||
+ | GZB0003, | ||
+ | GZB0004, | ||
+ | GZB0005, | ||
+ | GZB0006, | ||
+ | GZB0007, | ||
+ | GZB0008, | ||
+ | GZB0009, | ||
+ | GZB0010, | ||
+ | </ | ||
+ | |||
+ | |||
+ | 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 | ||
+ | |||
+ | < | ||
+ | # | ||
+ | # Object Type: TapeTrack Sync Definition File | ||
+ | # Description: | ||
+ | # System: TapeTrack | ||
+ | # SecLevel: Proprietary | ||
+ | # | ||
+ | # | ||
+ | SetLiteral(CUSTOMER, | ||
+ | SetLiteral(MEDIA, | ||
+ | SetCSVDelimiter("," | ||
+ | Extract(VOLUME, | ||
+ | Extract(USER1, | ||
+ | Extract(DESCRIPTION, | ||
+ | RemoveSpaces(DESCRIPTION); | ||
+ | # | ||
+ | # Add L suffixes to the Volume-ID based on Media Generation | ||
+ | # | ||
+ | AddTranslation2(VOLUME, | ||
+ | AddTranslation2(VOLUME, | ||
+ | AddTranslation2(VOLUME, | ||
+ | AddTranslation2(VOLUME, | ||
+ | AddTranslation2(VOLUME, | ||
+ | AddTranslation2(VOLUME, | ||
+ | AddTranslation2(VOLUME, | ||
+ | </ | ||
+ | |||
+ | {{tag> cookbook}} | ||
cookbook/sync.1560392316.txt.gz · Last modified: 2025/01/21 22:07 (external edit)