3 # Author: Eric Bollengier, 2009
6 # Run a simple backup of the Bacula build directory using the compressed option
7 # then backup a second time and finally restore it
9 TestName="exclude-dir-test"
15 scripts/copy-test-confs
16 cat >> $conf/bacula-dir.conf <<EOF
20 Exclude Dir Containing = ".nobkp"
28 Exclude Dir Containing = "bacula-dir.conf"
35 File = "$cwd/build/po"
39 sed 's/FileSet="CompressedSet"/FileSet=ExcludeDir/' $conf/bacula-dir.conf >$tmp/1
40 cp -f $tmp/1 $conf/bacula-dir.conf
41 change_jobname CompressedTest $JobName
44 mkdir -p ${cwd}/build/src/xxtestdir
45 touch ${cwd}/build/src/xxtestdir/.nobkp
46 cp ${cwd}/build/src/dird/*.c ${cwd}/build/src/xxtestdir
48 cat >tmp/bconcmds <<END_OF_DATA
52 estimate job=$JobName listing
55 label storage=File volume=TestVolume001
60 restore where=${cwd}/tmp/bacula-restores select all storage=File done
68 check_for_zombie_jobs storage=File
73 # should be ok if we remove the xxtestdir
74 rm -rf ${cwd}/build/src/xxtestdir
77 grep '/xxtestdir' $tmp/log3.out > /dev/null
79 print_debug "ERROR: Should not see xxtestdir in estimate output"
83 # build/po is included 2 times with a different exclude file
84 # we shouldn't see scripts and bin
85 nb=`egrep -c 'build/po/fr.po$' $tmp/log3.out`
87 print_debug "ERROR: Should see fr.po two times"
91 grep $rscripts $tmp/log3.out > /dev/null
93 print_debug "ERROR: Should not $rscripts in estimate output"
97 grep $conf $tmp/log3.out > /dev/null
99 print_debug "ERROR: Should not $conf in estimate output"