]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/verify-voltocat-test
Tweak virtual changer scripts
[bacula/bacula] / regress / tests / verify-voltocat-test
1 #!/bin/sh
2 #
3 # Run a simple backup of the Bacula build directory
4 #   then verify the Volume to the catalog.           
5 # This test should not be in the normal tests run since it
6 #   requires creating a mount point.
7 #
8 # To run this test
9 #    cd regress
10 #    mkdir xx
11 #    mkdir xx/boot
12 #    mount -t ext3 /dev/sda1 xx/boot
13 #      (where /dev/sda1 is your boot partion, or some other small partition)
14 #    cp regress/* xx
15 #
16 TestName="verify-voltocat-test"
17 JobName=VerifyVol
18 . scripts/functions
19
20 cwd=`pwd`
21 scripts/cleanup
22 scripts/copy-test-confs
23 echo "${cwd}/xx" >${cwd}/tmp/file-list
24 echo "${cwd}/xx/boot" >>${cwd}/tmp/file-list
25
26 change_jobname NightlySave $JobName
27 start_test
28
29 cat <<END_OF_DATA >tmp/bconcmds
30 @$out /dev/null
31 messages
32 @$out tmp/log1.out
33 setdebug level=1 storage=File sd
34 label storage=File volume=TestVolume001
35 run job=$JobName yes
36 wait
37 messages
38 @# 
39 @# now do a verify to catalog
40 @#
41 @$out ${cwd}/tmp/log2.out
42 setdebug level=12 dir
43 run job=VerifyVolume level=VolumeToCatalog
44 yes
45 wait
46 messages
47 @$out
48 quit
49 END_OF_DATA
50
51 run_bacula
52
53 sleep 2
54 check_for_zombie_jobs storage=File 
55 stop_bacula
56
57 grep "^  Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
58 bstat=$?
59 grep "^  Termination: *Verify OK" tmp/log2.out 2>&1 >/dev/null
60 rstat=$?
61 dstat=0
62 end_test