From d18d5df97c98fdb3c8bcaa24630c9e1aa7ee4539 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Thu, 18 Aug 2005 12:36:57 +0000 Subject: [PATCH] Update 2drive stuff git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2330 91ce42f0-d328-0410-95d8-f526ca767f89 --- regress/scripts/bacula-dir-win32-tape.conf | 2 +- regress/scripts/cleanup-2drive.in | 2 ++ regress/scripts/copy-2drive-confs | 4 ++++ regress/tests/2drive-incremental-2tape | 18 +++++++++++++++--- 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/regress/scripts/bacula-dir-win32-tape.conf b/regress/scripts/bacula-dir-win32-tape.conf index a54de6b4b2..84898c7190 100644 --- a/regress/scripts/bacula-dir-win32-tape.conf +++ b/regress/scripts/bacula-dir-win32-tape.conf @@ -13,7 +13,7 @@ # Director { # define myself - Name = rufus-dir + Name = roxie-dir DIRport = 8101 # where we listen for UA connections QueryFile = "/home/kern/bacula/regress/bin/query.sql" WorkingDirectory = "/home/kern/bacula/regress/working" diff --git a/regress/scripts/cleanup-2drive.in b/regress/scripts/cleanup-2drive.in index 1801abb506..705407f839 100755 --- a/regress/scripts/cleanup-2drive.in +++ b/regress/scripts/cleanup-2drive.in @@ -12,6 +12,7 @@ if ! test x@autochanger@ = x/dev/null; then fi mt -f @tape_drive1@ rewind mt -f @tape_drive1@ weof + bin/mtx-changer @autochanger@ unload 2 @tape_drive1@ 1 fi @@ -28,3 +29,4 @@ fi mt -f @tape_drive@ rewind mt -f @tape_drive@ weof +bin/mtx-changer @autochanger@ unload 1 @tape_drive@ 0 diff --git a/regress/scripts/copy-2drive-confs b/regress/scripts/copy-2drive-confs index 5877cea6e3..d25a351fa2 100755 --- a/regress/scripts/copy-2drive-confs +++ b/regress/scripts/copy-2drive-confs @@ -3,4 +3,8 @@ /bin/cp -f scripts/bacula-sd-2drive.conf bin/bacula-sd.conf /bin/cp -f scripts/test-bacula-fd.conf bin/bacula-fd.conf /bin/cp -f scripts/test-console.conf bin/bconsole.conf +outf="tmp/sed_tmp" +echo "s%# Autochanger = yes% Autochanger = yes%g" >${outf} +cp bin/bacula-dir.conf tmp/1 +sed -f ${outf} tmp/1 >bin/bacula-dir.conf touch bin/tape_options diff --git a/regress/tests/2drive-incremental-2tape b/regress/tests/2drive-incremental-2tape index 1eed24f84f..c2c84d6b62 100755 --- a/regress/tests/2drive-incremental-2tape +++ b/regress/tests/2drive-incremental-2tape @@ -42,10 +42,11 @@ cat <tmp/bconcmds @$out /dev/null messages @$out tmp/log1.out -label storage=DDS-4 volume=TestVolume001 slot=1 Pool=Default -label storage=DDS-4 volume=TestVolume002 slot=2 Pool=Default +label storage=DDS-4 volume=TestVolume001 slot=1 Pool=Default drive=0 +label storage=DDS-4 volume=TestVolume002 slot=2 Pool=Default drive=1 run job=NightlySave yes wait +status storage=DDS-4 messages quit END_OF_DATA @@ -59,14 +60,17 @@ else fi echo "ficheriro1.txt" >${cwd}/tmp/build/ficheriro1.txt echo "ficheriro2.txt" >${cwd}/tmp/build/ficheriro2.txt -bin/bconsole -c bin/bconsole.conf <tmp/bconcmds @$out /dev/null messages @$out tmp/log1.out @# Force Incremental on the second Volume update volume=TestVolume001 VolStatus=Used +status storage=DDS-4 run level=Incremental job=NightlySave yes wait +status storage=DDS-4 messages @# @# now do a restore @@ -82,6 +86,14 @@ messages @$out quit END_OF_DATA +if test "$debug" -eq 1 ; then + bin/bacula start + cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf +else + bin/bacula start 2>&1 >/dev/null + cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf 2>&1 >/dev/null +fi + bin/bacula stop 2>&1 >/dev/null grep "^ Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null bstat=$? -- 2.39.5