]> git.sur5r.net Git - bacula/bacula/blob - regress/tests/big-vol-test
Removed debug
[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 1 GB file
38 ${cwd}/build/src/tools/grow TestVolume001 5200000000
39 if [ $? != 0 ]; then
40    echo "Execute of ${cwd}/build/src/tools/grow failed."
41    exit 1
42 fi
43 size=`ls -l TestVolume001 | cut -f 5 -d ' '`
44 cd ${cwd}
45 cat <<END_OF_DATA >tmp/bconcmds
46 @output /dev/null
47 messages
48 @$out tmp/log1.out
49 sql
50 UPDATE Media SET Volbytes=${size} WHERE VolumeName='TestVolume001';
51
52 llist volume=TestVolume001
53 @# Now do another full save with big Volume
54 run level=Full job=$JobName yes
55 wait
56 messages
57 @# 
58 @# now do a restore
59 @#
60 sql
61 SELECT * FROM JobMedia;
62
63 @output tmp/log2.out
64 restore where=${cwd}/tmp/bacula-restores storage=File select all done
65 yes
66 wait
67 messages
68 @$out
69 quit
70 END_OF_DATA
71
72 run_bconsole
73 check_for_zombie_jobs storage=File
74 stop_bacula
75
76 check_two_logs
77 check_restore_diff
78 end_test
79 # Get rid of big files
80 rm -f ${cwd}/tmp/TestVolume001