]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/two-jobs-test
98a34a805349e77e4e897e53acdf5511ef97b250
[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
14 echo " "
15 echo " "
16 echo " === Starting two-jobs-test  ==="
17 echo " "
18 echo " "
19
20 bin/bacula start
21 bin/console -c bin/console.conf <<END_OF_DATA
22 @output /dev/null
23 messages
24 label
25 TestVolume001
26 run job=CompressedTest
27 yes
28 wait
29 messages
30 quit
31 END_OF_DATA
32 echo "Backup 1 done"
33 touch ${cwd}/build/src/dird/*.c
34 bin/console -c bin/console.conf <<END_OF_DATA
35 run job=CompressedTest
36 yes
37 wait
38 messages
39 @output
40 @# 
41 @# now do a restore
42 @#
43 restore
44 5
45 done
46 yes
47 wait
48 @output /dev/null
49 messages
50 quit
51 END_OF_DATA
52 bin/bacula stop
53 diff -ur build /tmp/bacula-restores${cwd}/build
54 if [ $? != 0 ] ; then
55    echo " "
56    echo " "
57    echo "  ===== two-jobs-test Bacula source failed!!! ===== "
58    echo "  ===== two-jobs-test failed!!! ===== " >>test.out
59    echo " "
60 else
61    echo "  ===== two-jobs-test Bacula source OK ===== "
62    echo "  ===== two-jobs-test OK ===== " >>test.out
63 fi
64 rm -rf /tmp/bacula-restores