3 # Run a simple backup of the Bacula build directory
4 # prune file records, then restore only README files.
6 TestName="fileregexp-test"
14 # Zap out any schedule in default conf file so that
15 # it doesn't start during our test
18 echo "s% Schedule =%# Schedule =%g" >${outf}
19 echo "s%File Retention =%File Retention = 2 #%" >> ${outf}
20 cp ${scripts}/bacula-dir.conf ${tmp}/1
21 sed -f ${outf} ${tmp}/1 >${scripts}/bacula-dir.conf
23 change_jobname BackupClient1 $JobName
26 cat <<END_OF_DATA >${tmp}/bconcmds
30 label volume=TestVolume001 storage=File pool=Default
40 restore where=${tmp}/bacula-restores
52 check_for_zombie_jobs storage=File
55 COUNT_OTHER=`find ${tmp}/bacula-restores -type f | grep -v README | wc -l`
56 COUNT_README=`find ${tmp}/bacula-restores -type f | grep README | wc -l`
58 if [ $COUNT_OTHER -gt 0 -o $COUNT_README -lt 11 ]; then
59 print_debug "Found non matching files"
60 print_debug `find ${tmp}/bacula-restores -type f | grep -v README`
64 #check_two_logs # don't work because of "warning file count mismatch"
65 grep "Backup OK" ${tmp}/log1.out > /dev/null
67 print_debug "Found error on backup"