3 # Create a 60MB file with random bytes. Back it up to 6 Volumes
4 # each constrained to 10MB using the automatic labeling feature.
6 TestName="six-vol-test"
10 if test ! -c /dev/urandom ; then
11 echo "No random device. Test skipped.\n"
16 scripts/copy-testa-confs
17 # copy special conf file
18 /bin/cp -f scripts/testb-bacula-dir.conf bin/bacula-dir.conf
20 echo "${cwd}/tmp/largefile" >${cwd}/tmp/file-list
21 # Create 56MB file with random data
22 echo "Creating a 56MB file with random data ..."
23 dd if=/dev/urandom of=${cwd}/tmp/largefile bs=1024 count=55000 >/dev/null 2>&1
24 echo "largefile created"
26 change_jobname MultiVol $JobName
29 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
32 @$out ${cwd}/tmp/log1.out
33 setdebug level=150 storage=File
34 run job=$JobName storage=File yes
35 run job=$JobName storage=File yes
36 run job=$JobName storage=File yes
37 run job=$JobName storage=File yes
38 run job=$JobName storage=File yes
45 @$out ${cwd}/tmp/log2.out
47 select * from JobMedia where JobId=4;
48 select * from JobMedia where JobId=5;
50 setdebug level=150 storage=File
51 restore where=${cwd}/tmp/bacula-restores select storage=File
62 check_for_zombie_jobs storage=File
66 diff ${cwd}/tmp/largefile ${cwd}/tmp/bacula-restores${cwd}/tmp/largefile 2>&1 >/dev/null