]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/verify-vol-test
59de6970bae23602e2881c282adc6241b8213559
[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 ===" >>tmp/log
18 echo " "
19
20 bin/bacula start
21 bin/console -c bin/console.conf <<END_OF_DATA
22 @output /dev/null
23 messages
24 @output
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 run job=VerifyVolume
35 yes
36 wait
37 @tee ${cwd}/tmp/original
38 messages
39 @output
40 quit
41 END_OF_DATA
42 sleep 2
43 bin/bacula stop
44 grep "Termination: *Verify OK" ${cwd}/tmp/original 2>&1 >/dev/null
45 if [ $? != 0 ] ; then
46    echo " "
47    echo " "
48    echo "  ===== Verify Volume failed!!! ===== "
49    echo "  ===== Verify Volume failed!!! ===== " >>test.out
50    echo " "
51 else
52    echo "  ===== Verify Volume Test OK ===== "
53    echo "  ===== Verify Volume Test OK ===== " >>test.out
54    scripts/cleanup
55 fi