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 5 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
30 echo " === Starting Two Pool Tape test at `date +%R:%S` ==="
31 echo " === Starting Two Pool Tape test at `date +%R:%S` ===" >>working/log
33 # Write out bconsole commands to a file
34 cat <<END_OF_DATA >tmp/bconcmds
38 label storage=DDS-4 volume=TestVolume001 slot=1 pool=Full drive=0
39 label storage=DDS-4 volume=TestVolume002 slot=2 pool=Default drive=0
41 @# Start job with Client run before and sleep
42 run job=NightlySave1 level=Full pool=Default yes
43 run job=NightlySave1 level=Full pool=Default yes
44 run job=NightlySave1 level=Full pool=Default yes
45 @# wait between starting jobs
47 @#setdebug level=100 storage=DDS-4
48 run job=NightlySave2 level=Full pool=Full yes
49 run job=NightlySave2 level=Full pool=Full yes
50 run job=NightlySave2 level=Full pool=Full yes
65 restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
73 # start Bacula and run bconsole commands
74 if test "$debug" -eq 1 ; then
76 cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
78 bin/bacula start 2>&1 >/dev/null
79 cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null
81 # Make sure no jobs are still running (debug check)
82 scripts/check_for_zombie_jobs storage=DDS-4
85 bin/bacula stop 2>&1 >/dev/null
86 # Check if backup done correctly
87 grep "^ Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
89 grep "^ Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
91 diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
92 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
95 echo " !!!!! Two Pool Tape test Bacula source failed!!! !!!!! "
96 echo " !!!!! Two Pool Tape test failed!!! !!!!! " >>test.out
99 echo " ===== Two Pool Tape test Bacula source OK ===== "
100 echo " ===== Two Pool Tape test OK ===== " >>test.out