]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/backup-bacula-test
e031a71ed835facac322f4ec0b6abbad498dea10
[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 rm -rf /tmp/TestVolume001 /tmp/bacula-restores
9 bin/bacula stop 
10 bin/drop_sqlite_tables
11 bin/make_sqlite_tables
12 bin/bacula start
13 bin/console -c bin/console.conf <<END_OF_DATA
14 @output /dev/null
15 messages
16 @output
17 label
18 TestVolume001
19 run job=NightlySave
20 yes
21 wait
22 messages
23 @# 
24 @# now do a restore
25 @#
26 restore
27 5
28 done
29 yes
30 @sleep 1
31 wait
32 @output /dev/null
33 messages
34 quit
35 END_OF_DATA
36 sleep 2
37 bin/bacula stop
38 diff -ur build /tmp/bacula-restores${cwd}/build
39 if [ $? != 0 ] ; then
40    echo " "
41    echo " "
42    echo "  ===== Backup Bacula Test failed!!! ===== "
43    echo "  ===== Backup Bacula Test failed!!! ===== " >>test.out
44    echo " "
45 else
46    echo "  ===== Backup Bacula Test OK ===== "
47    echo "  ===== Backup Bacula Test OK ===== " >>test.out
48 fi
49 rm -rf /tmp/bacula-restores