]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/verify-vol-test
Add new test
[bacula/bacula] / regress / tests / verify-vol-test
1 #!/bin/sh
2 #
3 # Run a simple backup of the Bacula build directory
4 #   then verify the catalog.           
5 #
6 cwd=`pwd`
7 scripts/copy-test-confs
8 rm -rf /tmp/TestVolume001 /tmp/bacula-restores
9 bin/bacula stop 2>&1 >/dev/null
10 bin/drop_sqlite_tables
11 bin/make_sqlite_tables
12
13 echo " "
14 echo " "
15 echo " === Starting verify Volume Test ==="
16 echo " "
17
18 bin/bacula start
19 bin/console -c bin/console.conf <<END_OF_DATA
20 @output /dev/null
21 messages
22 @output
23 label
24 TestVolume001
25 run job=NightlySave
26 yes
27 wait
28 messages
29 @# 
30 @# now do a verify volume
31 @#
32 run job=VerifyVolume
33 yes
34 wait
35 @tee /tmp/original
36 messages
37 @output
38 quit
39 END_OF_DATA
40 sleep 2
41 bin/bacula stop
42 grep "Termination: *Verify OK" /tmp/original 2>&1 >/dev/null
43 if [ $? != 0 ] ; then
44    echo " "
45    echo " "
46    echo "  ===== Verify Volume failed!!! ===== "
47    echo "  ===== Verify Volume failed!!! ===== " >>test.out
48    echo " "
49 else
50    echo "  ===== Verify Volume Test OK ===== "
51    echo "  ===== Verify Volume Test OK ===== " >>test.out
52 fi
53 rm -rf /tmp/bacula-restores
54 rm -f /tmp/original