cookbook:tsm
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| cookbook:tsm [2021/03/19 02:00] – [Synchronization] Scott Cunliffe | cookbook:tsm [2025/01/21 22:07] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Tivoli Storage Manager Sync Cookbook ====== | ====== Tivoli Storage Manager Sync Cookbook ====== | ||
| - | Tivoli Storage Manager (or TSM) is IBM's enterprise backup solution, and provides both a [[technote: | + | Tivoli Storage Manager (or TSM) is IBM's enterprise backup solution, and provides both a [[technote: |
| TSM is designed around several database tables that must be queried to get a complete list of tapes. | TSM is designed around several database tables that must be queried to get a complete list of tapes. | ||
| Line 33: | Line 33: | ||
| * stgpool_name: | * stgpool_name: | ||
| - | <sxh> | + | <code> |
| dsmadmc -dataonly=yes -id=userid -pa=password -tcpserveraddress=tsm01.gazillabyte.local \ | dsmadmc -dataonly=yes -id=userid -pa=password -tcpserveraddress=tsm01.gazillabyte.local \ | ||
| -displaymode=table -outfile=TSM-DRM.csv -commadelimited " | -displaymode=table -outfile=TSM-DRM.csv -commadelimited " | ||
| - | </sxh> | + | </code> |
| === From the Volume table: === | === From the Volume table: === | ||
| Line 44: | Line 44: | ||
| * location: Used to determine the location the [[object: | * location: Used to determine the location the [[object: | ||
| * stgpool_name: | * stgpool_name: | ||
| - | <sxh> | + | <code> |
| dsmadmc -dataonly=yes -id=userid -pa=password -tcpserveraddress=tsm01.gazillabyte.local \ | dsmadmc -dataonly=yes -id=userid -pa=password -tcpserveraddress=tsm01.gazillabyte.local \ | ||
| -displaymode=table -outfile=TSM-VOL.csv -commadelimited " | -displaymode=table -outfile=TSM-VOL.csv -commadelimited " | ||
| - | </sxh> | + | </code> |
| Output CSV files should be written to a directory where the TapeTrack Sync command can access them as input files for the Sync process. | Output CSV files should be written to a directory where the TapeTrack Sync command can access them as input files for the Sync process. | ||
| Line 55: | Line 55: | ||
| <note important> | <note important> | ||
| - | Synchronization with TapeTrack is performed by calling the [[cli: | + | Synchronization with TapeTrack is performed by calling the [[cli: |
| * The CSV file produced from the DRM table | * The CSV file produced from the DRM table | ||
| * The CSV file produced from the Volume table | * The CSV file produced from the Volume table | ||
| Line 68: | Line 68: | ||
| Sync command line using DRM output | Sync command line using DRM output | ||
| - | <sxh> | + | <code> |
| TMSS10Sync -a -d TSM-DRM.ttidef -S user: | TMSS10Sync -a -d TSM-DRM.ttidef -S user: | ||
| - | </sxh> | + | </code> |
| Where: | Where: | ||
| Line 80: | Line 80: | ||
| Sync command line using Volume output | Sync command line using Volume output | ||
| - | <sxh> | + | <code> |
| - | TMSS10Sync -a -d TSM-DRM.ttidef -S user: | + | TMSS10Sync -a -d TSM-VOL.ttidef -S user: |
| - | </sxh> | + | </code> |
| Where: | Where: | ||
| Line 92: | Line 92: | ||
| === Example batch file showing Sync process with dsmadmc extracted data and process output === | === Example batch file showing Sync process with dsmadmc extracted data and process output === | ||
| - | <sxh> | + | <code> |
| #!/bin/bash | #!/bin/bash | ||
| Line 139: | Line 139: | ||
| echo TMSS10MoveScratch -S user: | echo TMSS10MoveScratch -S user: | ||
| - | </sxh> | + | </code> |
| === Example Synchronization Definition File (.ttidef file) === | === Example Synchronization Definition File (.ttidef file) === | ||
| Line 154: | Line 154: | ||
| The following definition files assume default TSM locations and two Repositories (OFFS and LIBR) in TapeTrack | The following definition files assume default TSM locations and two Repositories (OFFS and LIBR) in TapeTrack | ||
| </ | </ | ||
| - | ===Volume | + | ===TSM-VOL |
| - | <sxh> | + | <code> |
| # Volume TTIDEF | # Volume TTIDEF | ||
| - | # | + | |
| # Set CSV delimiter | # Set CSV delimiter | ||
| SetCSVDelimiter("," | SetCSVDelimiter("," | ||
| Line 164: | Line 164: | ||
| SetLiteral(CUSTOMER, | SetLiteral(CUSTOMER, | ||
| SetLiteral(MEDIA, | SetLiteral(MEDIA, | ||
| - | # | + | |
| # Extract Volume-ID | # Extract Volume-ID | ||
| Extract(VOLUME, | Extract(VOLUME, | ||
| # | # | ||
| - | # Extract Scratch value for comparision | + | # Extract Scratch value for comparison |
| Extract(SCRATCH, | Extract(SCRATCH, | ||
| - | # | + | |
| # Extract Description | # Extract Description | ||
| Extract(DESCRIPTION, | Extract(DESCRIPTION, | ||
| RemoveSpaces(DESCRIPTION); | RemoveSpaces(DESCRIPTION); | ||
| - | # | + | |
| # If Scratch = Vault skip, anything else set SCRATCH to true | # If Scratch = Vault skip, anything else set SCRATCH to true | ||
| - | AddTranslation(SCRATCH, | + | AddTranslation(SCRATCH, |
| AddTranslation(SCRATCH, | AddTranslation(SCRATCH, | ||
| - | # | + | |
| # Exclude any lines starting with . or / | # Exclude any lines starting with . or / | ||
| AddString(EXCLUSION, | AddString(EXCLUSION, | ||
| AddString(EXCLUSION, | AddString(EXCLUSION, | ||
| - | </sxh> | + | </code> |
| - | ===DRM TTIDEF File=== | + | ===TSM-DRM TTIDEF File=== |
| - | <sxh> | + | <code> |
| # DRM TTIDEF | # DRM TTIDEF | ||
| - | # | + | |
| # Set CSV delimiter | # Set CSV delimiter | ||
| SetCSVDelimiter("," | SetCSVDelimiter("," | ||
| Line 197: | Line 197: | ||
| SetLiteral(CUSTOMER, | SetLiteral(CUSTOMER, | ||
| SetLiteral(MEDIA, | SetLiteral(MEDIA, | ||
| - | # | + | |
| # Extract Volume-ID | # Extract Volume-ID | ||
| Extract(VOLUME, | Extract(VOLUME, | ||
| - | # | + | |
| # Extract Repository value | # Extract Repository value | ||
| Extract(REPOSITORY, | Extract(REPOSITORY, | ||
| RemoveSpaces(REPOSITORY); | RemoveSpaces(REPOSITORY); | ||
| - | # | + | |
| # Extract Scratch value | # Extract Scratch value | ||
| Extract(SCRATCH, | Extract(SCRATCH, | ||
| RemoveSpaces(SCRATCH); | RemoveSpaces(SCRATCH); | ||
| - | # | + | |
| + | # Translate Scratch value | ||
| + | AddTranslation(SCRATCH, | ||
| + | AddTranslation(SCRATCH, | ||
| # Translate Repository value | # Translate Repository value | ||
| AddTranslation(REPOSITORY, | AddTranslation(REPOSITORY, | ||
| AddTranslation(REPOSITORY, | AddTranslation(REPOSITORY, | ||
| - | |||
| AddSkipOnRepositoryChange(" | AddSkipOnRepositoryChange(" | ||
| - | AddTranslation(SCRATCH, | + | # Exclude any lines starting with . or / |
| - | AddTranslation(SCRATCH, | + | |
| AddString(EXCLUSION, | AddString(EXCLUSION, | ||
| AddString(EXCLUSION, | AddString(EXCLUSION, | ||
| - | </sxh> | + | </code> |
| <- : | <- : | ||
| {{tag> cookbook}} | {{tag> cookbook}} | ||
cookbook/tsm.1616119221.txt.gz · Last modified: 2025/01/21 22:07 (external edit)
