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 20 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
32 echo "${cwd}/build" >>/tmp/file-list
33 echo "${cwd}/build" >>/tmp/file-list
34 echo "${cwd}/build" >>/tmp/file-list
35 echo "${cwd}/build" >>/tmp/file-list
36 echo "${cwd}/build" >>/tmp/file-list
37 echo "${cwd}/build" >>/tmp/file-list
38 echo "${cwd}/build" >>/tmp/file-list
39 echo "${cwd}/build" >>/tmp/file-list
40 echo "${cwd}/build" >>/tmp/file-list
41 echo "${cwd}/build" >>/tmp/file-list
45 echo " === Starting Two Pool Tape test at `date +%R:%S` ==="
46 echo " === Starting Two Pool Tape test at `date +%R:%S` ===" >>working/log
48 # Write out bconsole commands to a file
49 cat <<END_OF_DATA >tmp/bconcmds
53 label storage=DDS-4 volume=TestVolume001 slot=1 pool=Full drive=0
54 label storage=DDS-4 volume=TestVolume002 slot=2 pool=Default drive=0
55 run job=NightlySave level=Full pool=Default yes
56 @# wait between starting jobs
58 run job=NightlySave level=Full pool=Full yes
72 restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
80 # start Bacula and run bconsole commands
81 if test "$debug" -eq 1 ; then
83 cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
85 bin/bacula start 2>&1 >/dev/null
86 cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null
88 # Make sure no jobs are still running (debug check)
89 scripts/check_for_zombie_jobs storage=DDS-4
92 bin/bacula stop 2>&1 >/dev/null
93 # Check if backup done correctly
94 grep "^ Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
96 grep "^ Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
98 diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
99 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
102 echo " !!!!! Two Pool Tape test Bacula source failed!!! !!!!! "
103 echo " !!!!! Two Pool Tape test failed!!! !!!!! " >>test.out
106 echo " ===== Two Pool Tape test Bacula source OK ===== "
107 echo " ===== Two Pool Tape test OK ===== " >>test.out