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 # Make a relatively large backup set 10 x source code directory
22 echo "${cwd}/build" >/tmp/file-list
23 echo "${cwd}/build" >>/tmp/file-list
24 echo "${cwd}/build" >>/tmp/file-list
25 echo "${cwd}/build" >>/tmp/file-list
26 echo "${cwd}/build" >>/tmp/file-list
27 echo "${cwd}/build" >>/tmp/file-list
28 echo "${cwd}/build" >>/tmp/file-list
29 echo "${cwd}/build" >>/tmp/file-list
30 echo "${cwd}/build" >>/tmp/file-list
31 echo "${cwd}/build" >>/tmp/file-list
35 echo " === Starting Two Pool Tape test at `date +%R:%S` ==="
36 echo " === Starting Two Pool Tape test at `date +%R:%S` ===" >>working/log
38 # Write out bconsole commands to a file
39 cat <<END_OF_DATA >tmp/bconcmds
43 label storage=DDS-4 volume=TestVolume001 slot=1 pool=Full drive=0
44 label storage=DDS-4 volume=TestVolume002 slot=2 pool=Default drive=0
45 run job=NightlySave level=Full pool=Default yes
47 @#setdebug level=200 storage=DDS-4
48 run job=NightlySave level=Full pool=Full yes
62 restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
70 # start Bacula and run bconsole commands
71 if test "$debug" -eq 1 ; then
73 cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
75 bin/bacula start 2>&1 >/dev/null
76 cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null
78 # Make sure no jobs are still running (debug check)
79 scripts/check_for_zombie_jobs storage=DDS-4
82 bin/bacula stop 2>&1 >/dev/null
83 # Check if backup done correctly
84 grep "^ Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
86 grep "^ Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
88 diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
89 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
92 echo " !!!!! Two Pool Tape test Bacula source failed!!! !!!!! "
93 echo " !!!!! Two Pool Tape test failed!!! !!!!! " >>test.out
96 echo " ===== Two Pool Tape test Bacula source OK ===== "
97 echo " ===== Two Pool Tape test OK ===== " >>test.out