3 # This is Arno's test. It uses two pools, two tapes, and
4 # an autochanger. Note, the Director has three Pools in its
5 # conf: Default, Full, and Inc. Default is used in the
6 # NightlySave job by default. What is backed up is what
7 # is in /tmp/file-list, which is by default the Bacula
8 # source code (i.e. the build directory).
11 if test "$debug" -eq 1 ; then
18 scripts/copy-2tape-confs
19 scripts/prepare-two-tapes
21 echo "${cwd}/build" >/tmp/file-list
25 echo " === Starting Two Pool Tape test at `date +%R:%S` ==="
26 echo " === Starting Two Pool Tape test at `date +%R:%S` ===" >>working/log
28 # Write out bconsole commands to a file
29 cat <<END_OF_DATA >tmp/bconcmds
33 label storage=DDS-4 volume=TestVolume001 slot=1 pool=Default drive=0
34 label storage=DDS-4 volume=TestVolume002 slot=2 pool=Default drive=0
35 @#setdebug level=1000 client
36 run job=NightlySave yes
38 run job=NightlySave level=Full pool=Full yes
45 restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
53 # start Bacula and run bconsole commands
54 if test "$debug" -eq 1 ; then
56 cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
58 bin/bacula start 2>&1 >/dev/null
59 cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null
61 # Make sure no jobs are still running (debug check)
62 scripts/check_for_zombie_jobs storage=DDS-4
65 bin/bacula stop 2>&1 >/dev/null
66 # Check if backup done correctly
67 grep "^ Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
69 grep "^ Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
71 diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
72 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
75 echo " !!!!! Two Pool Tape test Bacula source failed!!! !!!!! "
76 echo " !!!!! Two Pool Tape test failed!!! !!!!! " >>test.out
79 echo " ===== Two Pool Tape test Bacula source OK ===== "
80 echo " ===== Two Pool Tape test OK ===== " >>test.out