]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/two-vol-test
2192c86dae3b420dbb8031bd188fe51891d02aaa
[bacula/bacula] / regress / tests / two-vol-test
1 #!/bin/sh
2 #
3 # Run a simple backup of the Bacula build directory but 
4 #   split the archive into two volumes
5 #
6 cwd=`pwd`
7 scripts/copy-test-confs
8 rm -rf tmp/TestVolume001 tmp/TestVolume002 tmp/bacula-restores
9 echo "${cwd}/build" >/tmp/file-list
10 bin/bacula stop 2>&1 >/dev/null
11 bin/drop_sqlite_tables
12 bin/make_sqlite_tables
13
14 echo " "
15 echo " "
16 echo " === Starting two-vol-test  ==="
17 echo " "
18
19 bin/bacula start
20 bin/console -c bin/console.conf <<END_OF_DATA
21 @output /dev/null
22 messages
23 label storage=File1
24 TestVolume001
25 label storage=File1
26 TestVolume002
27 update Volume=TestVolume001
28 6
29 3000000
30 10
31 @output
32 run job=NightlySave storage=File1
33 yes
34 wait
35 messages
36 @# 
37 @# now do a restore
38 @#
39 restore where=${cwd}/tmp/bacula-restores
40 5
41 done
42 yes
43 wait
44 messages
45 quit
46 END_OF_DATA
47 bin/bacula stop
48 diff -ur build  tmp/bacula-restores${cwd}/build
49 if [ $? != 0 ] ; then
50    echo " "
51    echo " "
52    echo "  ===== two-vol-test Bacula source failed!!! ===== "
53    echo "  ===== two-vol-test failed!!! ===== " >>test.out
54    echo " "
55 else
56    echo "  ===== two-vol-test Bacula source OK ===== "
57    echo "  ===== two-vol-test OK ===== " >>test.out
58    rm -rf tmp/bacula-restores tmp/TestVolume001 tmp/TestVolume002
59 fi