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 50 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
42 echo "${cwd}/build" >>/tmp/file-list
43 echo "${cwd}/build" >>/tmp/file-list
44 echo "${cwd}/build" >>/tmp/file-list
45 echo "${cwd}/build" >>/tmp/file-list
46 echo "${cwd}/build" >>/tmp/file-list
47 echo "${cwd}/build" >>/tmp/file-list
48 echo "${cwd}/build" >>/tmp/file-list
49 echo "${cwd}/build" >>/tmp/file-list
50 echo "${cwd}/build" >>/tmp/file-list
51 echo "${cwd}/build" >>/tmp/file-list
52 echo "${cwd}/build" >>/tmp/file-list
53 echo "${cwd}/build" >>/tmp/file-list
54 echo "${cwd}/build" >>/tmp/file-list
55 echo "${cwd}/build" >>/tmp/file-list
56 echo "${cwd}/build" >>/tmp/file-list
57 echo "${cwd}/build" >>/tmp/file-list
58 echo "${cwd}/build" >>/tmp/file-list
59 echo "${cwd}/build" >>/tmp/file-list
60 echo "${cwd}/build" >>/tmp/file-list
61 echo "${cwd}/build" >>/tmp/file-list
62 echo "${cwd}/build" >>/tmp/file-list
63 echo "${cwd}/build" >>/tmp/file-list
64 echo "${cwd}/build" >>/tmp/file-list
65 echo "${cwd}/build" >>/tmp/file-list
66 echo "${cwd}/build" >>/tmp/file-list
67 echo "${cwd}/build" >>/tmp/file-list
68 echo "${cwd}/build" >>/tmp/file-list
69 echo "${cwd}/build" >>/tmp/file-list
70 echo "${cwd}/build" >>/tmp/file-list
71 echo "${cwd}/build" >>/tmp/file-list
75 echo " === Starting Two Pool Tape test at `date +%R:%S` ==="
76 echo " === Starting Two Pool Tape test at `date +%R:%S` ===" >>working/log
78 # Write out bconsole commands to a file
79 cat <<END_OF_DATA >tmp/bconcmds
83 label storage=DDS-4 volume=TestVolume001 slot=1 pool=Full drive=0
84 label storage=DDS-4 volume=TestVolume002 slot=2 pool=Default drive=0
85 run job=NightlySave level=Full pool=Default yes
86 @# wait between starting jobs
88 run job=NightlySave level=Full pool=Full yes
102 restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
110 # start Bacula and run bconsole commands
111 if test "$debug" -eq 1 ; then
113 cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
115 bin/bacula start 2>&1 >/dev/null
116 cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null
118 # Make sure no jobs are still running (debug check)
119 scripts/check_for_zombie_jobs storage=DDS-4
122 bin/bacula stop 2>&1 >/dev/null
123 # Check if backup done correctly
124 grep "^ Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
126 grep "^ Termination: *Restore OK" tmp/log2.out 2>&1 >/dev/null
128 diff -r build tmp/bacula-restores${cwd}/build 2>&1 >/dev/null
129 if [ $? != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
132 echo " !!!!! Two Pool Tape test Bacula source failed!!! !!!!! "
133 echo " !!!!! Two Pool Tape test failed!!! !!!!! " >>test.out
136 echo " ===== Two Pool Tape test Bacula source OK ===== "
137 echo " ===== Two Pool Tape test OK ===== " >>test.out