]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/sparse-compressed-test
Final 1.30 documentation
[bacula/bacula] / regress / tests / sparse-compressed-test
1 #!/bin/sh
2 #
3 # Run a simple backup of the Bacula build directory using the Sparse option
4 #   then restore it.
5 #
6 cwd=`pwd`
7 scripts/copy-test-confs
8 rm -rf /tmp/TestVolume001 /tmp/bacula-restores
9 echo "${cwd}/build" >/tmp/file-list
10 bin/bacula stop 
11 bin/drop_sqlite_tables
12 bin/make_sqlite_tables
13 bin/bacula start
14 bin/console -c bin/console.conf <<END_OF_DATA
15 @output /dev/null
16 messages
17 @output
18 label
19 TestVolume001
20 run job=SparseCompressedTest
21 yes
22 wait
23 messages
24 @# 
25 @# now do a restore
26 @#
27 restore
28 5
29 done
30 yes
31 wait
32 @output /dev/null
33 messages
34 quit
35 END_OF_DATA
36 bin/bacula stop
37 diff -ur build /tmp/bacula-restores${cwd}/build
38 if [ $? != 0 ] ; then
39    echo " "
40    echo " "
41    echo "  ===== sparse-compressed-test Bacula source failed!!! ===== "
42    echo "  ===== sparse-compressed-test failed!!! ===== " >>test.out
43    echo " "
44 else
45    echo "  ===== sparse-compressed-test Bacula source OK ===== "
46    echo "  ===== sparse-compressed-test OK ===== " >>test.out
47 fi
48 rm -rf /tmp/bacula-restores