From: Kern Sibbald Date: Sat, 5 Jan 2008 15:11:09 +0000 (+0000) Subject: Update X-Git-Tag: Release-7.0.0~5167 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6c39b40ec7ba45903453972d67be0196acdb0908;p=bacula%2Fbacula Update git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6236 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/regress/tests/bscan-1t1d-tape b/regress/tests/bscan-1t1d-tape new file mode 100755 index 0000000000..6efeaebfdd --- /dev/null +++ b/regress/tests/bscan-1t1d-tape @@ -0,0 +1,145 @@ +#!/bin/sh +# +# Run a simple backup of the Bacula build directory using the compressed option +# then backup four times, each with incremental then +# do a bscan and restore. +# It should require at least 4 different bsrs. +# +TestName="bscan-1t1d-tape" +JobName=bscantape +. scripts/functions + +copy_tape_confs + +echo "${cwd}/build" >tmp/file-list + +cp ${cwd}/bin/bacula-sd.conf tmp/1 +sed "s%# Maximum File Size% Maximum File Size%" tmp/1 >${cwd}/bin/bacula-sd.conf + +change_jobname NightlySave $JobName +start_test + +cat <tmp/bconcmds +@output /dev/null +estimate job=$JobName listing +estimate job=$JobName listing +estimate job=$JobName listing +messages +@$out tmp/log1.out +setdebug level=2 storage=DDS-4 +label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default +run job=$JobName yes +wait +run job=$JobName level=Full yes +wait +run job=$JobName level=Full yes +wait +messages +quit +END_OF_DATA + +run_bacula +check_for_zombie_jobs storage=DDS-4 + +echo "Backup 1 done" +# make some files for the incremental to pick up +touch ${cwd}/build/src/dird/*.c ${cwd}/build/src/dird/*.o +touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o + +# +# run a second job +# +cat <tmp/bconcmds +@$out /dev/null +messages +@$out tmp/log1.out +run job=$JobName level=Incremental yes +wait +messages +quit +END_OF_DATA + +run_bacula +scripts/check_for_zombie_jobs storage=DDS-4 + +echo "Backup 2 done" +touch ${cwd}/build/src/dird/*.c +touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o +# +# run a third job +# +cat <tmp/bconcmds +@$out /dev/null +messages +@$out tmp/log1.out +run job=$JobName level=Incremental yes +wait +messages +quit +END_OF_DATA + +run_bacula +scripts/check_for_zombie_jobs storage=DDS-4 + +echo "Backup 3 done" +# make some files for the incremental to pick up +touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o +#echo "abc" > ${cwd}/build/src/lib/dummy +# +# run a fourth job +# +cat <tmp/bconcmds +@$out /dev/null +messages +@$out tmp/log1.out +run job=$JobName level=Incremental yes +wait +messages +quit +END_OF_DATA + +run_bacula + +scripts/check_for_zombie_jobs storage=DDS-4 +stop_bacula + +echo "Backup 4 done" +# +# now drop and recreate the database +# +cd bin +./drop_bacula_tables >/dev/null 2>&1 +./make_bacula_tables >/dev/null 2>&1 +./grant_bacula_privileges 2>&1 >/dev/null +cd .. + +echo "volume=TestVolume001" >tmp/bscan.bsr +if test "$debug" -eq 1 ; then + bin/bscan -w working -u regress -n regress -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf DDS-4 +else + bin/bscan -w working -u regress -n regress -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf DDS-4 2>&1 >/dev/null +fi + +cat <tmp/bconcmds +@$out /dev/null +messages +@$out tmp/log2.out +@# +@# now do a restore +@# +restore where=tmp/bacula-restores select all storage=DDS-4 done +yes +wait +messages +@$out +quit +END_OF_DATA + +run_bacula +check_for_zombie_jobs storage=DDS-4 +stop_bacula +rm -f ${cwd}/build/src/lib/dummy + +check_two_logs +check_restore_diff +end_test diff --git a/regress/tests/bscan-tape b/regress/tests/bscan-tape deleted file mode 100755 index 6efeaebfdd..0000000000 --- a/regress/tests/bscan-tape +++ /dev/null @@ -1,145 +0,0 @@ -#!/bin/sh -# -# Run a simple backup of the Bacula build directory using the compressed option -# then backup four times, each with incremental then -# do a bscan and restore. -# It should require at least 4 different bsrs. -# -TestName="bscan-1t1d-tape" -JobName=bscantape -. scripts/functions - -copy_tape_confs - -echo "${cwd}/build" >tmp/file-list - -cp ${cwd}/bin/bacula-sd.conf tmp/1 -sed "s%# Maximum File Size% Maximum File Size%" tmp/1 >${cwd}/bin/bacula-sd.conf - -change_jobname NightlySave $JobName -start_test - -cat <tmp/bconcmds -@output /dev/null -estimate job=$JobName listing -estimate job=$JobName listing -estimate job=$JobName listing -messages -@$out tmp/log1.out -setdebug level=2 storage=DDS-4 -label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default -run job=$JobName yes -wait -run job=$JobName level=Full yes -wait -run job=$JobName level=Full yes -wait -messages -quit -END_OF_DATA - -run_bacula -check_for_zombie_jobs storage=DDS-4 - -echo "Backup 1 done" -# make some files for the incremental to pick up -touch ${cwd}/build/src/dird/*.c ${cwd}/build/src/dird/*.o -touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o - -# -# run a second job -# -cat <tmp/bconcmds -@$out /dev/null -messages -@$out tmp/log1.out -run job=$JobName level=Incremental yes -wait -messages -quit -END_OF_DATA - -run_bacula -scripts/check_for_zombie_jobs storage=DDS-4 - -echo "Backup 2 done" -touch ${cwd}/build/src/dird/*.c -touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o -# -# run a third job -# -cat <tmp/bconcmds -@$out /dev/null -messages -@$out tmp/log1.out -run job=$JobName level=Incremental yes -wait -messages -quit -END_OF_DATA - -run_bacula -scripts/check_for_zombie_jobs storage=DDS-4 - -echo "Backup 3 done" -# make some files for the incremental to pick up -touch ${cwd}/build/src/lib/*.c ${cwd}/build/src/lib/*.o -#echo "abc" > ${cwd}/build/src/lib/dummy -# -# run a fourth job -# -cat <tmp/bconcmds -@$out /dev/null -messages -@$out tmp/log1.out -run job=$JobName level=Incremental yes -wait -messages -quit -END_OF_DATA - -run_bacula - -scripts/check_for_zombie_jobs storage=DDS-4 -stop_bacula - -echo "Backup 4 done" -# -# now drop and recreate the database -# -cd bin -./drop_bacula_tables >/dev/null 2>&1 -./make_bacula_tables >/dev/null 2>&1 -./grant_bacula_privileges 2>&1 >/dev/null -cd .. - -echo "volume=TestVolume001" >tmp/bscan.bsr -if test "$debug" -eq 1 ; then - bin/bscan -w working -u regress -n regress -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf DDS-4 -else - bin/bscan -w working -u regress -n regress -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf DDS-4 2>&1 >/dev/null -fi - -cat <tmp/bconcmds -@$out /dev/null -messages -@$out tmp/log2.out -@# -@# now do a restore -@# -restore where=tmp/bacula-restores select all storage=DDS-4 done -yes -wait -messages -@$out -quit -END_OF_DATA - -run_bacula -check_for_zombie_jobs storage=DDS-4 -stop_bacula -rm -f ${cwd}/build/src/lib/dummy - -check_two_logs -check_restore_diff -end_test