3 # Run a simple backup of the Bacula build directory using the compressed option
4 # then restore it. Then do the same against the second storage, File1, which
5 # has AllowCompression=No set.
7 TestName="allowcompress-test"
12 scripts/copy-test-confs
13 echo "${cwd}/build" >${cwd}/tmp/file-list
16 echo "s/FileStorage$/FileStorage; AllowCompression=no/" > $outf
17 cp $scripts/bacula-dir.conf $tmp/1
18 sed -f ${outf} ${cwd}/tmp/1 > $scripts/bacula-dir.conf
20 change_jobname CompressedTest $JobName
23 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
26 @$out ${cwd}/tmp/log1.out
28 label storage=File volume=TestVolume001
29 run level=Full job=$JobName storage=File yes
35 @$out ${cwd}/tmp/log2.out
36 restore where=${cwd}/tmp/bacula-restores select storage=File
43 @$out ${cwd}/tmp/log3.out
45 label storage=File1 volume=TestVolume002
46 run level=Full job=$JobName storage=File1 yes
52 @$out ${cwd}/tmp/log2.out
53 restore where=${cwd}/tmp/bacula-restores select storage=File1
63 check_for_zombie_jobs storage=File
68 grep " Software Compression" ${cwd}/tmp/log3.out | grep "None" 2>&1 1>/dev/null
70 echo " !!!!! No Compression when AllowCompression=yes is set !!!!!"