/etc/amanda/DailySet1/amanda.conf:
org "Zmanda" # your organization name for reports,
mailto "root@localhost" # space separated list of operators at your site
dumpcycle 7 # the number of days in the normal dump cycle
runspercycle 5 # the number of amdump runs in dumpcycle days
tapecycle 25 # the number of tapes in rotation
runtapes 1 # number of tapes to be used in a single run of amdump
tpchanger "chg-zd-mtx" # the tape-changer glue script
tapedev "/dev/nst0" # the no-rewind tape device
changerfile "/etc/amanda/DailySet1/changer.conf" # tape changer configuration parameter file
changerdev "/dev/sg2" # tape changer configuration parameter device
tapetype DLT # what kind of tape it is
labelstr "^DailySet1-[0-9][0-9]*$" # label constraint regex: all tapes must match
dtimeout 1800 # number of idle seconds before a dump is aborted
ctimeout 30 # max number of secconds amcheck waits for each client
etimeout 300 # number of seconds per filesystem for estimates
includefile "advanced.conf" #this is a way to break up amanda.conf in to separate file to make it easier to read and manage
includefile "/etc/amanda/template.d/dumptypes" #this is a way to break up amanda.conf in to separate file to make it easier to read and manage
includefile "/etc/amanda/template.d/tapetypes" #this is a way to break up amanda.conf in to separate file to make it easier to read and manage
These are the lines that need to be modified in /etc/amanda/DailySet1/advanced.conf:
amrecover_changer "/dev/sg2" # amrecover will use the changer if you restore
These are the lines that need to be modified in /etc/amanda/template.d/tapetypes:
define tapetype DLT {
comment "DLT tape drives"
length 20000 mbytes # 20 Gig tapes
filemark 2000 kbytes # I don't know what this means
speed 1536 kbytes # 1.5 Mb/s
}
Create a /etc/amanda/DailySet1/changer.conf file:
havereader=1 #add this line to file to enable barcode use for amanda
Execute amtape DailySet1 update and all the tape labels vs barcodes will appear in the /etc/amanda/DailySet1/changer-barcodes file:
-bash-3.00$ cat changer-barcodes TapeSet1-10 000043 TapeSet1-11 000031 TapeSet1-12 000037 TapeSet1-13 000045 TapeSet1-14 000054 TapeSet1-15 000041 TapeSet1-1 000044 TapeSet1-2 000036 TapeSet1-3 000053 TapeSet1-4 000062 TapeSet1-5 000060 TapeSet1-6 000059 TapeSet1-7 000057 TapeSet1-8 00000105 TapeSet1-9 000056
You can also execute the mtx -f /dev/sg2 status command to get tape information direct from the tape library to verify that Amanda is getting the correct barcode information:
-bash-3.00$ mtx -f /dev/sg2 status Storage Changer /dev/sg2:2 Drives, 25 Slots ( 0 Import/Export ) Data Transfer Element 0:Full (Storage Element 1 Loaded):VolumeTag = 000044 Data Transfer Element 1:Empty Storage Element 1:Empty Storage Element 2:Full :VolumeTag=000036 Storage Element 3:Full :VolumeTag=000053 Storage Element 4:Full :VolumeTag=000062 Storage Element 5:Full :VolumeTag=000060 Storage Element 6:Full :VolumeTag=000059 Storage Element 7:Full :VolumeTag=000057 Storage Element 8:Full :VolumeTag=00000105 Storage Element 9:Empty Storage Element 10:Full :VolumeTag=000043 Storage Element 11:Full :VolumeTag=000031 Storage Element 12:Full :VolumeTag=000037 Storage Element 13:Full :VolumeTag=000045 Storage Element 14:Full :VolumeTag=000054 Storage Element 15:Full :VolumeTag=000041 Storage Element 16:Full Storage Element 17:Empty Storage Element 18:Empty Storage Element 19:Empty Storage Element 20:Full :VolumeTag=000056 Storage Element 21:Empty Storage Element 22:Empty Storage Element 23:Empty Storage Element 24:Empty Storage Element 25:Empty