]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/verify-vol-test
New configure
[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
11 echo " "
12 echo " "
13 echo " === Starting verify Volume Test ==="
14 echo " === Starting verify Volume Test ===" >>working/log
15 echo " "
16
17 bin/bacula start 2>&1 >/dev/null
18 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
19 @output /dev/null
20 messages
21 @output tmp/log1.out
22 label storage=File volume=TestVolume001
23 run job=NightlySave yes
24 wait
25 messages
26 @# 
27 @# now do a verify volume
28 @#
29 @output ${cwd}/tmp/original
30 run job=VerifyVolume
31 yes
32 wait
33 messages
34 @output
35 quit
36 END_OF_DATA
37 sleep 2
38 scripts/check_for_zombie_jobs storage=File 
39 bin/bacula stop 2>&1 >/dev/null
40 grep "^Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
41 bstat=$?
42 grep "^Termination: *Verify OK" ${cwd}/tmp/original 2>&1 >/dev/null
43 if [ $? != 0 -o $bstat != 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    scripts/cleanup
53 fi