TapeTrack Documentation

Because there is more to tape management than you ever realized

User Tools

Site Tools


cookbook:veeam

This is an old revision of the document!


VEEAM Sync Cookbook

#
# Connect to Veeam database
SetODBC("DSN=veeam2");
# Extract data
SetSQL("SELECT [barcode],[media_pool_id],[last_write_time] FROM [VeeamBackup].[dbo].[Tape.tape_mediums]");


# Set Customer-ID
SetLiteral(CUSTOMER, "CUST");
# Set media to LTO as only one media type in report
SetLiteral(MEDIA, "LTO");

# Set place marker for Description 
SetLiteral(DESCRIPTION, "????");
# Set place marker for Repository
SetLiteral(REPOSITORY, "????");

# Extract Volume-ID from column 1
Extract(VOLUME, 1, 10, 0);
# Extract media pool-id for translation from column 2
Extract(USER1, 2, 50, 0);
# Extract last writetime from column 3
Extract(WRITETIME, 3, 50, 0);

# Set writetime format
SetWriteTimeFormat("%%Y-%%m-%%d %%H:%%M:%%S");

# Add translations to set Description based off Media Pool-ID
AddTranslation2(DESCRIPTION, USER1, "4C6BFE92-5C7F-BFE9-A18E-B52A8049C167", "Alpha media pool");
AddTranslation2(DESCRIPTION, USER1, "601ED8E9-647E-A19E-B18E-F6D66B0EE584", "Bravo media pool");
AddTranslation2(DESCRIPTION, USER1, "375TED22-7654-B34R-67GH-TMX642021SEE", "Charlie media pool");
AddTranslation2(DESCRIPTION, USER1, "9454924F-834C-22C0-9A35-F6D44B0EE214", "Free Tapes");
AddTranslation2(DESCRIPTION, USER1, "3376924Q-221C-59C0-3A65-F6D32B0FW857", "Imported");


# Add translations to set Repository based off Media Pool-ID
# Move matching media pools offsite
AddTranslation2(DESCRIPTION, USER1, "4C6BFE92-5C7F-BFE9-A18E-B52A8049C167", "OFFS");
AddTranslation2(DESCRIPTION, USER1, "601ED8E9-647E-A19E-B18E-F6D66B0EE584", "OFFS");
AddTranslation2(DESCRIPTION, USER1, "375TED22-7654-B34R-67GH-TMX642021SEE", "OFFS");

# Any other media pool place in library
AddTranslation2(REPOSITORY, USER1, "*", "LIBR");

# Stop any movement from racking back to offsite
AddSkipOnRepositoryChange("OFFS", "RACK", "*");

cookbook/veeam.1613522256.txt.gz · Last modified: 2025/01/21 22:07 (external edit)