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).
10 # Note, we use the virtual disk autochanger.
13 if test x${AUTOCHANGER} = x/dev/null ; then
14 echo "two-pool-test skipped. No autochanger."
18 if test "$debug" -eq 1 ; then
25 scripts/copy-2disk-confs
26 scripts/prepare-two-disks
28 # Make a relatively large backup set 5 x source code directory
29 # Reduced to 1 for portable
30 echo "${cwd}/build" >/tmp/file-list
34 echo " === Starting Two Pool Test at `date +%R:%S` ==="
35 echo " === Starting Two Pool Test at `date +%R:%S` ===" >>working/log
37 # Write out bconsole commands to a file
38 cat <<END_OF_DATA >tmp/bconcmds
42 label storage=DDS-4 volume=TestVolume001 slot=1 pool=Full drive=0
43 label storage=DDS-4 volume=TestVolume002 slot=2 pool=Default drive=0
45 @# Start job with Client run before and sleep
46 run job=NightlySave1 level=Full pool=Default yes
47 run job=NightlySave1 level=Full pool=Default yes
48 run job=NightlySave1 level=Full pool=Default yes
49 @# wait between starting jobs
51 @#setdebug level=100 storage=DDS-4
52 run job=NightlySave2 level=Full pool=Full yes
53 run job=NightlySave2 level=Full pool=Full yes
54 run job=NightlySave2 level=Full pool=Full yes
69 restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
77 # start Bacula and run bconsole commands
78 if test "$debug" -eq 1 ; then
80 cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
82 bin/bacula start 2>&1 >/dev/null
83 cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null
85 # Make sure no jobs are still running (debug check)
86 scripts/check_for_zombie_jobs storage=DDS-4
89 bin/bacula stop 2>&1 >/dev/null
90 # Check if backup done correctly
91 grep "^ Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
93 grep "^ Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
95 diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
96 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
99 echo " !!!!! Two Pool Test Bacula source failed!!! !!!!! "
100 echo " !!!!! Two Pool Test failed!!! !!!!! " >>test.out
103 echo " ===== Two Pool Test Bacula source OK ===== "
104 echo " ===== Two Pool Test OK ===== " >>test.out