]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/multi-client-test
baculum: Add strip_prefix, add_prefix, add_suffix and regex_where restore options...
[bacula/bacula] / regress / tests / multi-client-test
1 #!/bin/sh
2 #
3 # Copyright (C) 2000-2015 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
5 #
6
7 #
8 # Run four jobs at the same time, with two Volumes.
9 #   Set max Vol bytes of first volume
10 #   to less than total backup to force Bacula to use the second
11 #   Volume.
12 #
13 TestName="multi-client-test"
14 JobName=Multi-client
15 . scripts/functions
16
17 scripts/cleanup
18 scripts/copy-test-confs
19 /bin/cp -f scripts/multi-client-bacula-dir.conf bin/bacula-dir.conf
20
21 change_jobname NightlySave $JobName
22 start_test
23
24 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
25 @output /dev/null
26 messages
27 @$out   ${cwd}/tmp/log1.out
28 @# Make sure we can contact all clients
29 @#setdebug level=100 dir
30 status client=${HOST}-fd
31 status client=${hostname1}-fd
32 status client=${hostname2}-fd
33 status client=${hostname3}-fd
34 setdebug level=1 dir
35 label storage=File1
36 TestVolume001
37 label storage=File1
38 TestVolume002
39 update Volume=TestVolume001 MaxVolBytes=900000000
40 status storage=File1
41 @#llist volume=TestVolume001
42 @#llist volume=TestVolume002
43 run job=${hostname1} level=Full Storage=File1 yes
44 run job=${hostname2} level=Full Storage=File1 yes
45 @# run job=${hostname3} level=Full Storage=File1 yes
46 status storage=File1
47 run job=$JobName level=Full Storage=File1 yes
48 @sleep 2
49 status dir
50 status storage=File1
51 @sleep 5
52 messages
53 wait
54 status storage=File1
55 messages
56 @# 
57 @# now do a restore
58 @#
59 @$out   ${cwd}/tmp/log2.out
60 restore where=${cwd}/tmp/bacula-restores client=${hostname}-fd select storage=File1
61 unmark *
62 mark *
63 done
64 yes
65 wait
66 messages
67 status dir
68 status storage=File1
69 quit
70 END_OF_DATA
71
72 run_bacula
73 stop_bacula
74
75 check_two_logs
76 #if test "$debug" -eq 1 ; then
77 #   diff -r ${hostname_files} ${cwd}/tmp/bacula-restores/${hostname_files}                
78 #else
79 #   diff -r ${hostname_files} ${cwd}/tmp/bacula-restores/${hostname_files} 2>&1 >/dev/null
80 #fi
81 #dstat=$?
82 dstat=0
83 end_test