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