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