3 # Run backups with dummy tape driver
4 # This test setups an Autochanger with 80 slots
5 # and 5 drives (3 LTO3 and 2 LTO1)
7 # TAPE_DRIVE="$cwd/working/fake/drive0"
8 # TAPE_DRIVE1="$cwd/working/fake/drive0"
9 # AUTOCHANGER="$cwd/working/fake/conf"
10 # USE_FAKETAPE=--enable-faketape
11 # AUTOCHANGER_SCRIPT=disk-changer
14 TestName="faketape-test-changer"
21 scripts/copy-tape-confs
22 cp scripts/bacula-dir-faketape.conf bin/bacula-dir.conf
23 cp scripts/bacula-sd-faketape.conf bin/bacula-sd.conf
24 scripts/prepare-big-autochanger
26 echo "${cwd}/build" >${cwd}/tmp/file-list
30 when1=`perl -MPOSIX -e "print strftime('%F %T', localtime(time+30))"`
31 clientname=`awk '/Name = .*-fd/ { if (!ok) { print $3 ; ok=1 } }' bin/bacula-dir.conf`
33 # Catalog record for cleaning tape "CLN01" successfully created.
36 # Write out bconsole commands
37 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
40 @$out ${cwd}/tmp/log1.out
41 @#setdebug level=200 storage=LTO1
42 label barcodes pool=Scratch slots=1-40 storage=LTO1 drive=3
44 label barcodes pool=Scratch slots=41-80 storage=LTO3 drive=0
49 @$out ${cwd}/tmp/log2.out
50 run storage=LTO3 when="$when1" job=NightlySave pool=Inc yes
51 run storage=LTO3 when="$when1" job=NightlySave2 pool=Full yes
52 run storage=LTO3 when="$when1" job=NightlySave1 pool=Default yes
53 run storage=LTO1 when="$when1" job=NightlySave pool=Inc yes
54 run storage=LTO1 when="$when1" job=NightlySave2 pool=Full yes
55 run storage=LTO1 when="$when1" job=NightlySave1 pool=Default yes
61 check_for_zombie_jobs storage=LTO1 client=$clientname
62 check_for_zombie_jobs storage=LTO3 client=$clientname