]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/verify-vol-test
Final doc updates
[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 scripts/cleanup
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 verify Volume Test ==="
17 echo " === Starting verify Volume Test ===" >>working/log
18 echo " "
19
20 bin/bacula start 2>&1 >/dev/null
21 bin/console -c bin/console.conf <<END_OF_DATA
22 @output /dev/null
23 messages
24 @output tmp/log1.out
25 label storage=File
26 TestVolume001
27 run job=NightlySave
28 yes
29 wait
30 messages
31 @# 
32 @# now do a verify volume
33 @#
34 @output ${cwd}/tmp/original
35 run job=VerifyVolume
36 yes
37 wait
38 messages
39 @output
40 quit
41 END_OF_DATA
42 sleep 2
43 bin/bacula stop 2>&1 >/dev/null
44 grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
45 bstat=$?
46 grep "^Termination: *Verify OK" ${cwd}/tmp/original 2>&1 >/dev/null
47 if [ $? != 0 -o $bstat != 0 ] ; then
48    echo " "
49    echo " "
50    echo "  !!!!! Verify Volume failed!!! !!!!! "
51    echo "  !!!!! Verify Volume failed!!! !!!!! " >>test.out
52    echo " "
53 else
54    echo "  ===== Verify Volume Test OK ===== "
55    echo "  ===== Verify Volume Test OK ===== " >>test.out
56    scripts/cleanup
57 fi