]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/small-file-size-tape
Backport from Bacula Enterprise
[bacula/bacula] / regress / tests / small-file-size-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 #   to a tape where the maximum tape file size is set to 1M
10 #
11 TestName="small-file-size-tape"
12 JobName=smallfilesize
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 cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
22 sed "s%# Maximum File Size%  Maximum File Size%" ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
23
24 change_jobname NightlySave $JobName
25 start_test
26
27 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
28 @$out /dev/null
29 messages
30 @$out ${cwd}/tmp/log1.out
31 label storage=tape volume=TestVolume001 slot=0 pool=Default
32 setdebug level=2 storage=tape
33 run job=$JobName yes
34 run level=Full job=$JobName yes
35 run level=Full job=$JobName yes
36 @exec "sh -c 'touch ${cwd}/build/*.o
37 run job=$JobName yes
38 @exec "sh -c 'touch ${cwd}/build/*.o
39 wait
40 messages
41 @# 
42 @# now do a restore
43 @#
44 @$out   ${cwd}/tmp/log2.out
45 restore where=${cwd}/tmp/bacula-restores select storage=tape
46 unmark *
47 mark *
48 done
49 yes
50 wait
51 messages
52 quit
53 END_OF_DATA
54
55 run_bacula
56 check_for_zombie_jobs storage=tape
57 stop_bacula
58
59 check_two_logs
60 check_restore_diff
61 end_test