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 echo "${cwd}/build" >${cwd}/tmp/file-list
14 sed 's/Include {/Include { Exclude Dir Containing = ".nobkp"/' $conf/bacula-dir.conf > $tmp/1
15 cp -f $tmp/1 $conf/bacula-dir.conf
16 change_jobname CompressedTest $JobName
19 mkdir ${cwd}/build/src/testdir
20 touch ${cwd}/build/src/testdir/.nobkp
21 cp ${cwd}/build/src/dird/*.c ${cwd}/build/src/testdir
23 cat >tmp/bconcmds <<END_OF_DATA
27 estimate job=$JobName listing
30 label storage=File volume=TestVolume001
35 restore where=${cwd}/tmp/bacula-restores select all storage=File done
43 check_for_zombie_jobs storage=File
48 # should be ok if we remove the testdir
49 rm -rf ${cwd}/build/src/testdir
52 grep '/testdir' $tmp/log3.out > /dev/null
54 print_debug "ERROR: Should not see testdir in estimate output"