#!/bin/sh # # Run backups with dummy tape driver # This test setups an Autochanger with 80 slots # and 5 drives (3 LTO3 and 2 LTO1) # # TAPE_DRIVE="$cwd/working/ach/drive0" # TAPE_DRIVE1="$cwd/working/ach/drive0" # AUTOCHANGER="$cwd/working/ach/conf" # USE_FAKETAPE=--enable-faketape # AUTOCHANGER_SCRIPT=disk-changer # TestName="faketape-test-changer" JobName=backup . scripts/functions require_faketape scripts/cleanup scripts/copy-tape-confs cp scripts/bacula-dir-faketape.conf bin/bacula-dir.conf cp scripts/bacula-sd-faketape.conf bin/bacula-sd.conf scripts/prepare-fake-autochanger echo "${cwd}/build" >${cwd}/tmp/file-list start_test when1=`perl -MPOSIX -e "print strftime('%F %T', localtime(time+30))"` clientname=`awk '/Name = .*-fd/ { if (!ok) { print $3 ; ok=1 } }' bin/bacula-dir.conf` # Catalog record for cleaning tape "CLN01" successfully created. # CLN01 | Cleaning # Write out bconsole commands cat <${cwd}/tmp/bconcmds @output /dev/null messages @$out ${cwd}/tmp/log1.out @#setdebug level=200 storage=LTO1 label barcodes pool=Scratch slots=1-40 storage=LTO1 drive=3 yes messages list volumes END_OF_DATA run_bacula stop_bacula cat <${cwd}/tmp/bconcmds @$out ${cwd}/tmp/log2.out label barcodes pool=Scratch slots=41-80 storage=LTO3 drive=0 yes messages list volumes @$out ${cwd}/tmp/log3.out run storage=LTO3 when="$when1" job=NightlySave pool=Inc yes run storage=LTO3 when="$when1" job=NightlySave2 pool=Full yes run storage=LTO3 when="$when1" job=NightlySave1 pool=Default yes run storage=LTO1 when="$when1" job=NightlySave pool=Inc yes run storage=LTO1 when="$when1" job=NightlySave2 pool=Full yes run storage=LTO1 when="$when1" job=NightlySave1 pool=Default yes wait messages END_OF_DATA run_bacula check_for_zombie_jobs storage=LTO1 client=$clientname check_for_zombie_jobs storage=LTO3 client=$clientname stop_bacula grep 'Error: Re-read' tmp/log3.out > /dev/null if test $? = 0; then echo "Found Re-read errors" bstat=1 fi end_test