--- /dev/null
+#!/bin/sh
+#
+# Run a simple backup of the Bacula build directory using the compressed option
+# then backup a second time and finally restore it
+#
+TestName="exclude-dir-test"
+JobName=exclude-dir
+. scripts/functions
+
+cwd=`pwd`
+scripts/cleanup
+scripts/copy-test-confs
+echo "${cwd}/build" >${cwd}/tmp/file-list
+sed 's/Include {/Include { Exclude Dir Containing = ".nobkp"/' $conf/bacula-dir.conf > $tmp/1
+cp -f $tmp/1 $conf/bacula-dir.conf
+change_jobname CompressedTest $JobName
+start_test
+
+cat >tmp/bconcmds <<END_OF_DATA
+@$out /dev/null
+messages
+@$out $tmp/log3.out
+estimate job=$JobName listing
+messages
+@$out $tmp/log1.out
+label storage=File volume=TestVolume001
+run job=$JobName yes
+wait
+messages
+@$out $tmp/log2.out
+restore where=${cwd}/tmp/bacula-restores select all storage=File done
+yes
+wait
+messages
+quit
+END_OF_DATA
+
+run_bacula
+check_for_zombie_jobs storage=File
+stop_bacula
+
+check_two_logs
+check_restore_diff
+end_test