]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/multi-drive-group-test
Tweak correct English in debug output of regress tests
[bacula/bacula] / regress / tests / multi-drive-group-test
1 #!/bin/sh
2 #
3 # This script is used to test multiple devices grouped in
4 # the director configuration
5 #
6 #
7 TestName="multi-drive-group-test"
8 JobName=backup
9 . scripts/functions
10
11 scripts/cleanup
12 scripts/copy-2disk-confs
13 scripts/prepare-disk-changer
14
15 echo "s/signature=MD5/signature=MD5; readfifo=yes/" > $tmp/1
16 echo "s/FileStorage/FileStorage; Device=FileStorage2; Device=FileStorage3; Device=FileStorage4/" >> $tmp/1
17 sed -f $tmp/1 $conf/bacula-dir.conf > $tmp/2 
18 # Allow auto label 
19 $bperl -e 'add_attribute("$tmp/2", "Label Format", "Vol", "Pool", "Default")'
20 $bperl -e 'add_attribute("$tmp/2", "Action On Purge", "Truncate", "Pool", "Default")'
21 $bperl -e 'add_attribute("$tmp/2", "Label Format", "Vol", "Pool", "Inc")'
22 $bperl -e 'add_attribute("$conf/bacula-sd.conf", "Label Media", "yes", "Device")'
23
24 # set this to do round robbin
25 #$bperl -e 'set_maximum_concurrent_jobs("$conf/bacula-sd.conf", 1, "Device")'
26
27 $bperl -e 'add_attribute("$tmp/2", "Prefer Mounted Volumes", "no", "Job")';
28
29 # Disable spooling for each job
30 $bperl -e 'add_attribute("$tmp/2", "SpoolData",    "no",  "Job")'
31 cp $tmp/2 $conf/bacula-dir.conf
32
33 $bperl -e 'extract_resource("$conf/bacula-sd.conf", "Device", "FileStorage")' > $tmp/2
34 for i in 2 3 4; do
35     sed "s/FileStorage/FileStorage$i/" $tmp/2 >> $conf/bacula-sd.conf
36 done
37
38 disable_pluguins
39
40 echo "$cwd/build" >${cwd}/tmp/file-list
41 echo "$tmp/fifo" >>${cwd}/tmp/file-list
42
43 mkfifo $tmp/fifo
44 (sleep 15 > $tmp/fifo
45  sleep 3 > $tmp/fifo
46 )&
47
48 change_jobname $JobName
49 start_test
50
51 # test with autolabel
52 #
53 #
54 # Write out bconsole commands
55 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
56 @out /dev/null
57 messages
58 @$out ${cwd}/tmp/log1.out
59 run level=full job=backup storage=File pool=Default yes
60 run level=full job=backup storage=File pool=Default yes
61 run level=full job=backup storage=File pool=Default yes
62 run level=full job=backup storage=File pool=Inc yes
63 run level=full job=backup storage=File pool=Inc yes
64 run level=full job=backup storage=File pool=Default yes
65 run level=full job=backup storage=File pool=Default yes
66 run level=full job=backup storage=File pool=Default yes
67 run level=full job=backup storage=File pool=Default yes
68 @sleep 3
69 messages
70 status storage=File
71 status dir
72 messages
73 wait
74 messages
75 quit
76 END_OF_DATA
77
78 run_bacula
79
80 check_for_zombie_jobs storage=File
81 check_for_zombie_jobs storage=tape
82 stop_bacula
83
84 touch $tmp/log2.out
85 check_two_logs
86 #check_restore_diff
87
88 end_test