]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/six-vol-test
Enhance 6 vol test add ANSI tape label test
[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 /bin/cp -f scripts/testb-bacula-dir.conf bin/bacula-dir.conf
18 echo "${cwd}/tmp/largefile" >/tmp/file-list
19 # Create 56MB file with random data
20 echo "Creating a 56MB file with random data ..."
21 dd if=/dev/urandom of=${cwd}/tmp/largefile bs=1024 count=55000
22 echo "largefile created"
23
24 change_jobname MultiVol $JobName
25 start_test
26
27 cat <<END_OF_DATA >tmp/bconcmds
28 @output /dev/null
29 messages
30 @$out tmp/log1.out
31 run job=$JobName storage=File yes
32 run job=$JobName storage=File yes
33 run job=$JobName storage=File yes
34 run job=$JobName storage=File yes
35 run job=$JobName storage=File yes
36 wait
37 list volumes
38 messages
39 @# 
40 @# now do a restore
41 @#
42 @$out tmp/log2.out
43 restore where=${cwd}/tmp/bacula-restores select storage=File
44 unmark *
45 mark *
46 done
47 yes
48 wait
49 messages
50 @output
51 quit
52 END_OF_DATA
53
54 run_bacula
55 check_for_zombie_jobs storage=File
56 stop_bacula
57
58 check_two_logs
59 diff tmp/largefile  tmp/bacula-restores${cwd}/tmp/largefile 2>&1 >/dev/null
60 dstat=$?
61 end_test