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 x${AUTOCHANGER} = x/dev/null ; then
12 echo "two-pool-tape test skipped. No autochanger."
16 if test "$debug" -eq 1 ; then
23 scripts/copy-2tape-confs
24 scripts/prepare-two-tapes
26 # Make a relatively large backup set 5 x source code directory
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
46 @# Start job with Client run before and sleep
47 run job=NightlySave1 level=Full pool=Default yes
48 run job=NightlySave1 level=Full pool=Default yes
49 run job=NightlySave1 level=Full pool=Default yes
50 @# wait between starting jobs
52 @#setdebug level=100 storage=DDS-4
53 run job=NightlySave2 level=Full pool=Full yes
54 run job=NightlySave2 level=Full pool=Full yes
55 run job=NightlySave2 level=Full pool=Full yes
70 restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
78 # start Bacula and run bconsole commands
79 if test "$debug" -eq 1 ; then
81 cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
83 bin/bacula start 2>&1 >/dev/null
84 cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null
86 # Make sure no jobs are still running (debug check)
87 scripts/check_for_zombie_jobs storage=DDS-4
90 bin/bacula stop 2>&1 >/dev/null
91 # Check if backup done correctly
92 grep "^ Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
94 grep "^ Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
96 diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
97 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
100 echo " !!!!! Two Pool Tape test Bacula source failed!!! !!!!! "
101 echo " !!!!! Two Pool Tape test failed!!! !!!!! " >>test.out
104 echo " ===== Two Pool Tape test Bacula source OK ===== "
105 echo " ===== Two Pool Tape test OK ===== " >>test.out