]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/multi-drive1-test
regress: tweak the message in the update_win32()
[bacula/bacula] / regress / tests / multi-drive1-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", "Label Format", "Vol", "Pool", "Inc")'
21 $bperl -e 'add_attribute("$conf/bacula-sd.conf", "Label Media", "yes", "Device")'
22
23 # set this to do round robbin
24 $bperl -e 'set_maximum_concurrent_jobs("$conf/bacula-sd.conf", 1, "Device")'
25
26 # Disable spooling for each job
27 $bperl -e 'add_attribute("$tmp/2", "SpoolData",    "no",  "Job")'
28 cp $tmp/2 $conf/bacula-dir.conf
29
30 $bperl -e 'extract_resource("$conf/bacula-sd.conf", "Device", "FileStorage")' > $tmp/2
31 for i in 2 3 4; do
32     sed "s/FileStorage/FileStorage$i/" $tmp/2 >> $conf/bacula-sd.conf
33 done
34
35 disable_pluguins
36
37 echo "$cwd/build" >${cwd}/tmp/file-list
38 echo "$tmp/fifo" >>${cwd}/tmp/file-list
39
40 mkfifo $tmp/fifo
41 (sleep 15 > $tmp/fifo)&
42
43 change_jobname $JobName
44 start_test
45
46 # test with autolabel
47 #
48 #
49 # Write out bconsole commands
50 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
51 @out /dev/null
52 messages
53 @$out ${cwd}/tmp/log1.out
54 run level=full job=backup storage=File pool=Default yes
55 run level=full job=backup storage=File pool=Default yes
56 run level=full job=backup storage=File pool=Default yes
57 run level=full job=backup storage=File pool=Inc yes
58 run level=full job=backup storage=File pool=Inc yes
59 @sleep 3
60 messages
61 status storage=File
62 status dir
63 messages
64 wait
65 messages
66 quit
67 END_OF_DATA
68
69 run_bacula
70
71 check_for_zombie_jobs storage=File
72 check_for_zombie_jobs storage=tape
73 stop_bacula
74
75 touch $tmp/log2.out
76 check_two_logs
77 #check_restore_diff
78
79 end_test