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