]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/verify-vol-test
regress: tweak the message in the update_win32()
[bacula/bacula] / regress / tests / verify-vol-test
1 #!/bin/sh
2 #
3 # Run a simple backup of the Bacula build directory
4 #   then verify the catalog.           
5 #
6 TestName="verify-vol-test"
7 JobName=VerifyVol
8 . scripts/functions
9
10 cwd=`pwd`
11 scripts/cleanup
12 scripts/copy-test-confs
13 echo "${cwd}/build" >${cwd}/tmp/file-list
14 rm -f ${cwd}/build/sparsefile
15 #
16 # Add this back when verify can handle sparse files
17 #  the same way that backup does
18 #
19 #dd if=${cwd}/build/configure of=${cwd}/build/sparsefile bs=1 count=1 seek=10M
20
21 change_jobname NightlySave $JobName
22 start_test
23
24 cat <<END_OF_DATA >tmp/bconcmds
25 @$out /dev/null
26 messages
27 @$out tmp/log1.out
28 setdebug level=1 storage=File sd
29 label storage=File volume=TestVolume001
30 run job=$JobName yes
31 wait
32 messages
33 @# 
34 @# now do a verify volume
35 @#
36 @$out ${cwd}/tmp/log2.out
37 setdebug level=12 dir
38 run job=VerifyVolume
39 yes
40 wait
41 messages
42 @$out ${cwd}/tmp/log3.out
43 run job=VerifyVolume level=DiskToCatalog
44 yes
45 wait
46 messages
47 quit
48 END_OF_DATA
49
50 #
51 #  ***FIXME***
52 # Note, add sparse file backup and check that checksum is
53 #  correct.  Bug #1140
54 #  create sparse file
55 #  dd if=/dev/zero of=sparsefile bs=1 count=0 seek=10M
56 #
57
58 run_bacula
59
60 sleep 2
61 check_for_zombie_jobs storage=File 
62 stop_bacula
63
64 grep "^  Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
65 bstat=$?
66 grep "^  Termination: *Verify OK" tmp/log2.out 2>&1 >/dev/null
67 rstat=$?
68 if test $rstat=0; then
69    grep "^  Termination: *Verify OK" tmp/log3.out 2>&1 >/dev/null
70    rstat=$?
71 fi
72 dstat=0
73 end_test