]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/big-vol-test
Make verify job log same as other logs -- fixes bug #2328
[bacula/bacula] / regress / tests / big-vol-test
1 #!/bin/sh
2 #
3 # Copyright (C) 2000-2015 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
5 #
6
7 #
8 # Create a big Volume > 5 GB and backup to it to test disk
9 #   seeking on big volumes.  We cheat and artifically grow 
10 #   the volume.
11 #
12 TestName="big-vol-test"
13 JobName=bigvol
14 . scripts/functions
15
16 scripts/cleanup
17 scripts/copy-test-confs
18 cwd=`pwd`
19 echo "${cwd}/build" >${cwd}/tmp/file-list
20
21 change_jobname CompressedTest $JobName
22 start_test
23
24 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
25 @$out /dev/null
26 messages
27 @$out ${cwd}/tmp/log1.out
28 @#setdebug level=100 storage=File
29 label storage=File volume=TestVolume001
30 run job=$JobName yes
31 wait
32 messages
33 quit
34 END_OF_DATA
35
36 run_bacula
37 check_for_zombie_jobs storage=File
38
39 #
40 # Now increase the size of the Volume using gigaslam
41 #
42 cd ${cwd}/tmp
43 # make big file
44 size=5200000000
45 ${cwd}/build/src/tools/grow TestVolume001 ${size}
46 if [ $? != 0 ]; then
47    echo "Execute of ${cwd}/build/src/tools/grow failed."
48    exit 1
49 fi
50 cd ${cwd}
51
52 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
53 @$out /dev/null
54 messages
55 @$out ${cwd}/tmp/log1.out
56 sql
57 UPDATE Media SET Volbytes=${size} WHERE VolumeName='TestVolume001';
58
59 llist volume=TestVolume001
60 @# Now do another full save with big Volume
61 run level=Full job=$JobName yes
62 wait
63 messages
64 @# 
65 @# now do a restore
66 @#
67 sql
68 SELECT * FROM JobMedia;
69
70 @$out ${cwd}/tmp/log2.out
71 restore where=${cwd}/tmp/bacula-restores storage=File select all done
72 yes
73 wait
74 messages
75 quit
76 END_OF_DATA
77
78 run_bconsole
79 check_for_zombie_jobs storage=File
80 stop_bacula
81
82 check_two_logs
83 check_restore_diff
84 end_test
85 # Get rid of big files
86 rm -f ${cwd}/tmp/TestVolume001