]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/backup-win32-tape
Update
[bacula/bacula] / regress / tests / backup-win32-tape
1 #!/bin/sh
2 #
3 # Run a simple backup of the Bacula build directory 
4 #   to a tape then restore it, we do that twice to ensure that
5 #   we can correctly append to a tape.
6 #
7 cwd=`pwd`
8 scripts/copy-win32-confs
9 scripts/cleanup-tape
10
11 echo "${cwd}/build" >/tmp/file-list
12
13 echo " "
14 echo " "
15 echo " === Starting Backup Win32 tape test at `date +%R:%S` ==="
16 echo " === Starting Backup Win32 tape test at `date +%R:%S` ===" >>working/log
17 echo " "
18
19 bin/bacula start 2>&1 >/dev/null
20 bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
21 @output /dev/null
22 messages
23 @tee tmp/log1.out
24 label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default
25 run job=NightlySave yes
26 @sleep 10
27 status storage=DDS-4
28 @sleep 30
29 messages
30 wait
31 messages
32 @# 
33 @# now do a restore
34 @#
35 @#output tmp/log2.out
36 @#restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
37 @#yes
38 @#wait
39 @#messages
40 END_OF_DATA
41 scripts/check_for_zombie_jobs storage=DDS-4
42
43 bin/bacula stop 2>&1 >/dev/null
44 grep "^  Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
45 bstat=$?
46 if [ $bstat != 0 ] ; then
47    echo " "
48    echo " "
49    echo "  !!!!! Backup Win32 tape test failed!!! !!!!! "
50    echo "  !!!!! Backup Win32 tape test failed!!! !!!!! " >>test.out
51    echo " "
52 else
53    echo "  ===== Backup Win32 tape test OK ===== "
54    echo "  ===== Backup Win32 tape test OK ===== " >>test.out
55    scripts/cleanup
56 fi