]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/two-jobs-test
Initial revision
[bacula/bacula] / regress / tests / two-jobs-test
1 #!/bin/sh
2 #
3 # Run a simple backup of the Bacula build directory using the compressed option
4 #   then backup a second time and finally 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 label
18 TestVolume001
19 run job=CompressedTest
20 yes
21 wait
22 messages
23 quit
24 END_OF_DATA
25 echo "Backup 1 done"
26 touch ${cwd}/build/src/dird/*.c
27 bin/console -c bin/console.conf <<END_OF_DATA
28 run job=CompressedTest
29 yes
30 wait
31 messages
32 @output
33 @# 
34 @# now do a restore
35 @#
36 restore
37 5
38 done
39 yes
40 wait
41 @output /dev/null
42 messages
43 quit
44 END_OF_DATA
45 bin/bacula stop
46 diff -ur build /tmp/bacula-restores${cwd}/build
47 if [ $? != 0 ] ; then
48    echo " "
49    echo " "
50    echo "  ===== two-jobs-test Bacula source failed!!! ===== "
51    echo "  ===== two-jobs-test failed!!! ===== " >>test.out
52    echo " "
53 else
54    echo "  ===== two-jobs-test Bacula source OK ===== "
55    echo "  ===== two-jobs-test OK ===== " >>test.out
56 fi
57 rm -rf /tmp/bacula-restores