]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/six-vol-test
ebl Add new tests
[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 echo "${cwd}/tmp/largefile" >/tmp/file-list
18 # Create 56MB file with random data
19 echo "Creating a 56MB file with random data ..."
20 dd if=/dev/urandom of=${cwd}/tmp/largefile bs=1024 count=55000
21 echo "largefile created"
22
23 change_jobname MultiVol $JobName
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=$JobName storage=File yes
31 wait
32 list volumes
33 messages
34 @# 
35 @# now do a restore
36 @#
37 @$out tmp/log2.out
38 restore where=${cwd}/tmp/bacula-restores select storage=File
39 unmark *
40 mark *
41 done
42 yes
43 wait
44 messages
45 @output
46 quit
47 END_OF_DATA
48
49 run_bacula
50 check_for_zombie_jobs storage=File
51 stop_bacula
52
53 check_two_logs
54 diff tmp/largefile  tmp/bacula-restores${cwd}/tmp/largefile 2>&1 >/dev/null
55 dstat=$?
56 end_test