]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/six-vol-test
ffa1f770affdc223ec97881f51cbed556607f7d1
[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 cwd=`pwd`
7 scripts/copy-testa-confs
8 scripts/cleanup
9 echo "${cwd}/tmp/largefile" >/tmp/file-list
10 # Create 56MB file with random data
11 echo "Creating a 56MB file with random data ..."
12 dd if=/dev/urandom of=${cwd}/tmp/largefile bs=1024 count=55000
13 echo "largefile created"
14 bin/bacula stop 2>&1 >/dev/null
15 bin/drop_sqlite_tables
16 bin/make_sqlite_tables
17
18 echo " "
19 echo " "
20 echo " === Starting two-vol-test  ==="
21 echo " === Starting two-vol-test  ===" >>working/log
22 echo " "
23
24 bin/bacula start
25 bin/console -c bin/console.conf <<END_OF_DATA
26 messages
27 @output
28 run job=MultiVol storage=File
29 yes
30 wait
31 messages
32 @# 
33 @# now do a restore
34 @#
35 restore where=${cwd}/tmp/bacula-restores
36 5
37 done
38 yes
39 wait
40 messages
41 quit
42 END_OF_DATA
43 bin/bacula stop
44 diff tmp/largefile  tmp/bacula-restores${cwd}/tmp/largefile
45 if [ $? != 0 ] ; then
46    echo " "
47    echo " "
48    echo "  ===== six-vol-test Bacula source failed!!! ===== "
49    echo "  ===== six-vol-test failed!!! ===== " >>test.out
50    echo " "
51 else
52    echo "  ===== six-vol-test Bacula source OK ===== "
53    echo "  ===== six-vol-test OK ===== " >>test.out
54    scripts/cleanup
55 fi