]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/sparse-test
Make machine name independent + move log to working
[bacula/bacula] / regress / tests / sparse-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 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 sparse-test ==="
17 echo " === Starting sparse-test ===" >>working/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=SparseTest
28 yes
29 wait
30 messages
31 @# 
32 @# now do a restore
33 @#
34 restore
35 5
36 done
37 yes
38 wait
39 @output /dev/null
40 messages
41 quit
42 END_OF_DATA
43 bin/bacula stop
44 diff -r build /tmp/bacula-restores${cwd}/build
45 if [ $? != 0 ] ; then
46    echo " "
47    echo " "
48    echo "  ===== sparse-test Bacula source failed!!! ===== "
49    echo "  ===== sparse-test failed!!! ===== " >>test.out
50    echo " "
51 else
52    echo "  ===== sparse-test Bacula source OK ===== "
53    echo "  ===== sparse-test OK ===== " >>test.out
54    scripts/cleanup
55 fi