]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/backup-bacula-test
Clean up + adapt to new Job name
[bacula/bacula] / regress / tests / backup-bacula-test
1 #!/bin/sh
2 #
3 # Run a simple backup of the Bacula build directory
4 #   then restore it.
5 #
6 cwd=`pwd`
7 scripts/copy-confs
8 scripts/cleanup
9 bin/bacula stop 2>&1 >/dev/null
10 bin/drop_sqlite_tables
11 bin/make_sqlite_tables
12
13 echo " "
14 echo " "
15 echo " === Starting Backup Bacula Test ==="
16 echo " === Starting Backup Bacula Test ===" >>working/log
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
25 TestVolume001
26 run job=Client1
27 yes
28 wait
29 messages
30 @# 
31 @# now do a restore
32 @#
33 restore
34 5
35 done
36 yes
37 @sleep 1
38 wait
39 @output /dev/null
40 messages
41 quit
42 END_OF_DATA
43 sleep 2
44 bin/bacula stop
45 diff -r build /tmp/bacula-restores${cwd}/build
46 if [ $? != 0 ] ; then
47    echo " "
48    echo " "
49    echo "  ===== Backup Bacula Test failed!!! ===== "
50    echo "  ===== Backup Bacula Test failed!!! ===== " >>test.out
51    echo " "
52 else
53    echo "  ===== Backup Bacula Test OK ===== "
54    echo "  ===== Backup Bacula Test OK ===== " >>test.out
55    scripts/cleanup
56 fi