3 # Copyright (C) 2000-2015 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
8 # Run a simple backup of the Bacula build directory using the compressed option
9 # then backup four times, each with incremental then
10 # do a bscan and restore.
11 # It should require at least 4 different bsrs.
13 TestName="bscan-fast-tape"
21 echo "${cwd}/build" >${cwd}/tmp/file-list
23 cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
24 # sed "s%# Maximum File Size% Maximum File Size%" ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
26 change_jobname NightlySave $JobName
29 cat <<END_OF_DATA >tmp/bconcmds
33 setdebug level=2 storage=tape
34 label storage=tape volume=TestVolume001 slot=0 pool=Default
41 echo "Starting Bacula tape writing"
42 #$bin/btape -c bin/bacula-sd.conf /dev/nst0 <<END_OF_DATA
56 #check_for_zombie_jobs storage=tape
58 echo "End writing tape"
61 # now drop and recreate the database
64 ./drop_bacula_tables >/dev/null 2>&1
65 ./make_bacula_tables >/dev/null 2>&1
66 ./grant_bacula_privileges 2>&1 >/dev/null
69 echo "Begin attempt to read tape that crashes the system"
70 echo "volume=TestVolume001" >tmp/bscan.bsr
74 strace -o strace.new $bin/bscan -d200 -w working $BSCANLIBDBI -u regress -n regress -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf tape
76 cat <<END_OF_DATA >tmp/bconcmds
83 restore where=${cwd}/tmp/bacula-restores select all storage=tape done
91 check_for_zombie_jobs storage=tape
93 rm -f ${cwd}/build/src/lib/dummy