${rscripts}/cleanup
${rscripts}/copy-test-confs
+sed 's/Max Run Time/#Max Run Time/' $conf/bacula-dir.conf > $tmp/1
+sed 's/SpoolData/#SpoolData/' $tmp/1 > $conf/bacula-dir.conf
+
echo "${cwd}/files" >${tmp}/file-list
rm -rf ${tmp}/bacula-restores
mkdir -p $cwd/files
find ${tmp}/bacula-restores | wc -l | tee $tmp/bacula-restore-list
rm -rf ${tmp}/bacula-restores
-cp working/log files/log${WHICHDB}-$(date +%F_%H-%M).log
+# check the time needed to compute restore list
+if [ x$db_password != x ]; then
+ p="-P $db_password"
+fi
+(time $src/src/tools/bbatch -r 1 -n $db_name -u $db_user $p -w $tmp) >> $working/log 2>&1
+
+cp $working/log files/log${WHICHDB}-$(date +%F_%H-%M).log
cp $tmp/log2.out files/log2${WHICHDB}-$(date +%F_%H-%M).log
+
end_test