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