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