]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/six-vol-test
10fb23ea969b1d06336d1a375d1a74c6d75c2cc6
[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 set_debug 0
10
11 if test ! -c /dev/urandom ; then
12    echo "No random device. Test skipped.\n"
13    exit 0
14 fi
15 cwd=`pwd`
16 scripts/copy-testa-confs
17 scripts/cleanup
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 start_test
25
26 cat <<END_OF_DATA >tmp/bconcmds
27 @output /dev/null
28 messages
29 @$out tmp/log1.out
30 run job=MultiVol storage=File yes
31 wait
32 messages
33 @# 
34 @# now do a restore
35 @#
36 @$out tmp/log2.out
37 restore where=${cwd}/tmp/bacula-restores select storage=File
38 unmark *
39 mark *
40 done
41 yes
42 wait
43 messages
44 @output
45 quit
46 END_OF_DATA
47
48 run_bacula
49 check_for_zombie_jobs storage=File
50 stop_bacula
51
52 check_two_logs
53 diff tmp/largefile  tmp/bacula-restores${cwd}/tmp/largefile 2>&1 >/dev/null
54 dstat=$?
55 end_test