]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/small-file-size-tape
regress: Add test that mixes mssql and systemstate
[bacula/bacula] / regress / tests / small-file-size-tape
1 #!/bin/sh
2 #
3 # Run a simple backup of the Bacula build directory 
4 #   to a tape where the maximum tape file size is set to 1M
5 #
6 TestName="small-file-size-tape"
7 JobName=smallfilesize
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 cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
17 sed "s%# Maximum File Size%  Maximum File Size%" ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
18
19 change_jobname NightlySave $JobName
20 start_test
21
22 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
23 @$out /dev/null
24 messages
25 @$out ${cwd}/tmp/log1.out
26 label storage=tape volume=TestVolume001 slot=0 pool=Default
27 setdebug level=2 storage=tape
28 run job=$JobName yes
29 wait
30 messages
31 @# 
32 @# now do a restore
33 @#
34 @$out   ${cwd}/tmp/log2.out
35 restore where=${cwd}/tmp/bacula-restores select storage=tape
36 unmark *
37 mark *
38 done
39 yes
40 wait
41 messages
42 quit
43 END_OF_DATA
44
45 run_bacula
46 check_for_zombie_jobs storage=tape
47 stop_bacula
48
49 check_two_logs
50 check_restore_diff
51 end_test