]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/six-vol-test
36591d72a9b1f63dc951ae063d911652571e318d
[bacula/bacula] / regress / tests / six-vol-test
1 #!/bin/sh
2 #
3 # Create a 60MB file with random bytes. Back it up to 6 Volumes
4 #   each constrained to 10MB using the automatic labeling feature.
5 #
6 TestName="six-vol-test"
7 JobName=SixVol
8 . scripts/functions
9
10 if test ! -c /dev/urandom ; then
11    echo "No random device. Test skipped.\n"
12    exit 0
13 fi
14
15 scripts/cleanup
16 scripts/copy-testa-confs
17 # copy special conf file
18 /bin/cp -f scripts/testb-bacula-dir.conf bin/bacula-dir.conf
19
20 echo "${cwd}/tmp/largefile" >/tmp/file-list
21 # Create 56MB file with random data
22 echo "Creating a 56MB file with random data ..."
23 dd if=/dev/urandom of=${cwd}/tmp/largefile bs=1024 count=55000
24 echo "largefile created"
25
26 change_jobname MultiVol $JobName
27 start_test
28
29 cat <<END_OF_DATA >tmp/bconcmds
30 @output /dev/null
31 messages
32 @$out tmp/log1.out
33 run job=$JobName storage=File yes
34 run job=$JobName storage=File yes
35 run job=$JobName storage=File yes
36 run job=$JobName storage=File yes
37 run job=$JobName storage=File yes
38 wait
39 list volumes
40 messages
41 @# 
42 @# now do a restore
43 @#
44 @$out tmp/log2.out
45 restore where=${cwd}/tmp/bacula-restores select storage=File
46 unmark *
47 mark *
48 done
49 yes
50 wait
51 messages
52 @output
53 quit
54 END_OF_DATA
55
56 run_bacula
57 check_for_zombie_jobs storage=File
58 stop_bacula
59
60 check_two_logs
61 diff tmp/largefile  tmp/bacula-restores${cwd}/tmp/largefile 2>&1 >/dev/null
62 dstat=$?
63 end_test