]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/verify-vol-tape
regress: Add test that mixes mssql and systemstate
[bacula/bacula] / regress / tests / verify-vol-tape
1 #!/bin/sh
2 #
3 # Run a simple backup of the Bacula build directory
4 #   then verify the catalog.           
5 #
6 TestName="verify-vol-tape"
7 JobName=VerifyVol
8 . scripts/functions
9
10 require_tape_drive
11
12 scripts/copy-tape-confs
13 scripts/cleanup-tape
14
15 echo "${cwd}/build" >${cwd}/tmp/file-list
16
17 change_jobname NightlySave $JobName
18 start_test
19
20 cat <<END_OF_DATA >tmp/bconcmds
21 @$out /dev/null
22 messages
23 @$out tmp/log1.out
24 setdebug level=1 storage=tape sd
25 label storage=tape volume=TestVolume001 pool=Default
26 run job=$JobName yes
27 wait
28 messages
29 @# 
30 @# now do a verify volume
31 @#
32 @$out ${cwd}/tmp/original
33 run job=VerifyTape pool=Default
34 yes
35 wait
36 messages
37 quit
38 END_OF_DATA
39
40 run_bacula
41
42 sleep 2
43 check_for_zombie_jobs storage=tape
44 stop_bacula
45
46 grep "^  Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null
47 bstat=$?
48 grep "^  Termination: *Verify OK" ${cwd}/tmp/original 2>&1 >/dev/null
49 rstat=$?
50 dstat=0
51 end_test