X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=regress%2Ftests%2Fbackup-bacula-test;h=8cf65cf560e0a131a9319987aac548da629da633;hb=70f4723a1094c8c55d7a501ff52c1ff51a3542bf;hp=7768b8c3ea035feba667d04b7b96c944d9324d5c;hpb=cac876e743b1fcbf3d9b008bc7a9eab37dc19676;p=bacula%2Fbacula diff --git a/regress/tests/backup-bacula-test b/regress/tests/backup-bacula-test index 7768b8c3ea..8cf65cf560 100755 --- a/regress/tests/backup-bacula-test +++ b/regress/tests/backup-bacula-test @@ -3,54 +3,99 @@ # Run a simple backup of the Bacula build directory # then restore it. # -cwd=`pwd` +TestName="backup-bacula-test" +JobName=backup +. scripts/functions + +scripts/cleanup scripts/copy-confs -rm -rf /tmp/TestVolume001 /tmp/bacula-restores -bin/bacula stop -bin/drop_sqlite_tables -bin/make_sqlite_tables - -echo " " -echo " " -echo " === Starting Backup Bacula Test ===" -echo " " -echo " " - -bin/bacula start -bin/console -c bin/console.conf <${outf} +cp $scripts/bacula-dir.conf $tmp/1 +sed -f ${outf} $tmp/1 >$scripts/bacula-dir.conf + +change_jobname Client1 $JobName +start_test + +cat <$tmp/bconcmds @output /dev/null messages -@output -label -TestVolume001 -run job=NightlySave -yes +@$out $tmp/log1.out +setdebug level=100 storage=File +label volume=TestVolume001 storage=File pool=Default +run job=$JobName yes +status storage=File +status storage=File +status storage=File +status storage=File +status storage=File +status storage=File +@sleep 1 +status storage=File +status storage=File +status storage=File +status storage=File +status storage=File +@sleep 1 +status storage=File +status storage=File +status storage=File +status storage=File +status storage=File wait messages @# @# now do a restore @# -restore -5 -done +@$out $tmp/log2.out +restore where=$tmp/bacula-restores select all done yes -@sleep 1 wait +messages +@$out +quit +END_OF_DATA + +run_bacula +check_for_zombie_jobs storage=File +stop_bacula + +cat <$tmp/bconcmds @output /dev/null messages +@$out $tmp/log1.out +@#setdebug level=100 storage=File +run job=$JobName yes +wait +messages +@# +@# now do a restore +@# +@$out $tmp/log2.out +restore where=$tmp/bacula-restores select all done +yes +wait +messages +@$out quit END_OF_DATA -sleep 2 -bin/bacula stop -diff -ur build /tmp/bacula-restores${cwd}/build -if [ $? != 0 ] ; then - echo " " - echo " " - echo " ===== Backup Bacula Test failed!!! ===== " - echo " ===== Backup Bacula Test failed!!! ===== " >>test.out - echo " " -else - echo " ===== Backup Bacula Test OK ===== " - echo " ===== Backup Bacula Test OK ===== " >>test.out -fi -rm -rf /tmp/bacula-restores + +# +# Now do a second backup after making a few changes +# +touch ${cwd}/build/src/dird/*.c +echo "test test" > ${cwd}/build/src/dird/xxx +# + +run_bacula +check_for_zombie_jobs storage=File +stop_bacula + +check_two_logs +check_restore_diff +end_test