3 # Run a simple backup of the Bacula build directory using the compressed option
4 # then backup a second time and finally restore it
6 TestName="exclude-dir-test"
12 scripts/copy-test-confs
13 cat >> $conf/bacula-dir.conf <<EOF
17 Exclude Dir Containing = ".nobkp"
25 Exclude Dir Containing = "bacula-dir.conf"
32 File = "$cwd/build/po"
36 sed 's/FileSet="CompressedSet"/FileSet=ExcludeDir/' $conf/bacula-dir.conf >$tmp/1
37 cp -f $tmp/1 $conf/bacula-dir.conf
38 change_jobname CompressedTest $JobName
41 mkdir -p ${cwd}/build/src/xxtestdir
42 touch ${cwd}/build/src/xxtestdir/.nobkp
43 cp ${cwd}/build/src/dird/*.c ${cwd}/build/src/xxtestdir
45 cat >tmp/bconcmds <<END_OF_DATA
49 estimate job=$JobName listing
52 label storage=File volume=TestVolume001
57 restore where=${cwd}/tmp/bacula-restores select all storage=File done
65 check_for_zombie_jobs storage=File
70 # should be ok if we remove the xxtestdir
71 rm -rf ${cwd}/build/src/xxtestdir
74 grep '/xxtestdir' $tmp/log3.out > /dev/null
76 print_debug "ERROR: Should not see xxtestdir in estimate output"
80 # build/po is included 2 times with a different exclude file
81 # we shouldn't see scripts and bin
82 nb=`egrep -c 'build/po/fr.po$' $tmp/log3.out`
84 print_debug "ERROR: Should see fr.po two times"
88 grep $rscripts $tmp/log3.out > /dev/null
90 print_debug "ERROR: Should not $rscripts in estimate output"
94 grep $conf $tmp/log3.out > /dev/null
96 print_debug "ERROR: Should not $conf in estimate output"