3 # Copyright (C) 2000-2015 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
8 # Run a simple backup of the Bacula build directory using the compressed option
9 # then restore it. Then do the same against the second storage, File1, which
10 # has AllowCompression=No set.
12 TestName="allowcompress-test"
17 scripts/copy-test-confs
18 echo "${cwd}/build" >${cwd}/tmp/file-list
21 echo "s/FileStorage$/FileStorage; AllowCompression=no/" > $outf
22 cp $scripts/bacula-dir.conf $tmp/1
23 sed -f ${outf} ${cwd}/tmp/1 > $scripts/bacula-dir.conf
25 change_jobname CompressedTest $JobName
28 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
31 @$out ${cwd}/tmp/log1.out
33 label storage=File volume=TestVolume001
34 setdebug level=4 storage=File
35 run level=Full job=$JobName storage=File yes
41 @$out ${cwd}/tmp/log2.out
42 restore where=${cwd}/tmp/bacula-restores select storage=File
49 @$out ${cwd}/tmp/log3.out
51 label storage=File1 volume=TestVolume002
52 setdebug level=4 storage=File
53 run level=Full job=$JobName storage=File1 yes
59 @$out ${cwd}/tmp/log2.out
60 restore where=${cwd}/tmp/bacula-restores select storage=File1
71 check_for_zombie_jobs storage=File
76 grep " Software Compression" ${cwd}/tmp/log3.out | grep "None" 2>&1 1>/dev/null
78 echo " !!!!! No Compression when AllowCompression=yes is set !!!!!"