From e0a896e8437f4e02637aebb1c679370c1d0a20cb Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sat, 25 Nov 2006 12:53:24 +0000 Subject: [PATCH] Update git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3695 91ce42f0-d328-0410-95d8-f526ca767f89 --- regress/tests/restore-disk-seek-test | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/regress/tests/restore-disk-seek-test b/regress/tests/restore-disk-seek-test index d0b6460052..f0ffe2df67 100755 --- a/regress/tests/restore-disk-seek-test +++ b/regress/tests/restore-disk-seek-test @@ -9,7 +9,7 @@ TestName="restore-disk-seek-test" JobName=restore-disk-seek . scripts/functions -set_debug 0 +set_debug 1 scripts/cleanup scripts/copy-test-confs @@ -17,20 +17,32 @@ echo "${cwd}/tmp/build" >/tmp/file-list rm -rf ${cwd}/tmp/build mkdir ${cwd}/tmp/build # Copy only the .c files (to be restored) -cp -p ${cwd}/build/src/dird/*.c ${cwd}/tmp/build +# set files to "*.c" for all c files +files="ua_update.c" +# files="*.c" +for i in ${files}; do + cp -p ${cwd}/build/src/dird/${i} ${cwd}/tmp/build +done cd ${cwd}/tmp/build ls >../1 cd .. sed s%\^%${cwd}/tmp/build/% 1 >restore-list +# # At this point restore-list contains the list # of files we will restore +# rm -f 1 cd ${cwd} -# Now backup *everything* +# +# Now arrange to backup *everything* +# rm -rf ${cwd}/tmp/build mkdir ${cwd}/tmp/build cp -fp ${cwd}/build/src/dird/* ${cwd}/tmp/build -# Enable MaximumFileSize +# +# Enable MaximumFileSize to ensure lots of JobMedia records and thus +# lots of seeking +# cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1 sed "s%# Maximum File Size% Maximum File Size%" ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf @@ -49,7 +61,9 @@ messages @# now do a restore @# @$out tmp/log2.out +setdebug level=30 fd sql +@# print the JobMedia records select * from JobMedia; restore bootstrap=${cwd}/tmp/kern.bsr where=${cwd}/tmp/bacula-restores storage=File @@ -70,7 +84,9 @@ stop_bacula # Now setup a control directory of only what we *should* restore rm -rf ${cwd}/tmp/build mkdir ${cwd}/tmp/build -cp -p ${cwd}/build/src/dird/*.c ${cwd}/tmp/build +for i in ${files}; do + cp -p ${cwd}/build/src/dird/${i} ${cwd}/tmp/build +done check_two_logs check_restore_tmp_build_diff -- 2.39.5