]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/big-vol-test
ebl Add new tests
[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 echo "${cwd}/build" >/tmp/file-list
14
15 change_jobname CompressedTest $JobName
16 start_test
17
18 cat <<END_OF_DATA >tmp/bconcmds
19 @output /dev/null
20 messages
21 @$out tmp/log1.out
22 @#setdebug level=100 storage=File
23 label storage=File volume=TestVolume001
24 run job=$JobName yes
25 wait
26 messages
27 quit
28 END_OF_DATA
29
30 run_bacula
31 check_for_zombie_jobs storage=File
32
33 #
34 # Now increase the size of the Volume using gigaslam
35 #
36 cd ${cwd}/tmp
37 # make big file
38 size=5200000000
39 ${cwd}/build/src/tools/grow TestVolume001 ${size}
40 if [ $? != 0 ]; then
41    echo "Execute of ${cwd}/build/src/tools/grow failed."
42    exit 1
43 fi
44 cd ${cwd}
45
46 cat <<END_OF_DATA >tmp/bconcmds
47 @output /dev/null
48 messages
49 @$out tmp/log1.out
50 sql
51 UPDATE Media SET Volbytes=${size} WHERE VolumeName='TestVolume001';
52
53 llist volume=TestVolume001
54 @# Now do another full save with big Volume
55 run level=Full job=$JobName yes
56 wait
57 messages
58 @# 
59 @# now do a restore
60 @#
61 sql
62 SELECT * FROM JobMedia;
63
64 @output tmp/log2.out
65 restore where=${cwd}/tmp/bacula-restores storage=File select all done
66 yes
67 wait
68 messages
69 @$out
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