]> git.sur5r.net Git - bacula/bacula/commitdiff
Update
authorKern Sibbald <kern@sibbald.com>
Mon, 12 Dec 2005 15:08:09 +0000 (15:08 +0000)
committerKern Sibbald <kern@sibbald.com>
Mon, 12 Dec 2005 15:08:09 +0000 (15:08 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2664 91ce42f0-d328-0410-95d8-f526ca767f89

regress/scripts/do_sed
regress/tests/bscan-tape
regress/tests/bscan-test

index 477d2fc269d05399a3ea8bc6dce34608f5b7353c..61614122f26d9a0f719fbcc405ac7f7c187ba2cd 100755 (executable)
@@ -11,11 +11,7 @@ if test $# != 6 ; then
 fi
 out="/tmp/sed_tmp"
 cwd=`pwd`
-host=`hostname | tr '.' ' ' | cut -f 1 -d ' '`
-if test x$host = x ; then
-   host=localhost 
-fi
-host="localhost"
+HOST="localhost"
 # Create sed command script
 echo "s%@sbindir@%${cwd}/bin%g" >${out}
 echo "s%@scriptdir@%${cwd}/bin%g" >>${out}
@@ -26,7 +22,7 @@ echo "s%@job_email@%${1}%g" >>${out}
 echo "s%@tape_drive@%${2}%g" >>${out}
 echo "s%@autochanger@%${3}%g" >>${out}
 echo "s%@tmpdir@%${cwd}/tmp%g" >>${out}
-echo "s%@hostname@%${host}%g" >>${out}
+echo "s%@hostname@%${HOST}%g" >>${out}
 echo "s%@changer_path@%${4}%g" >>${out}
 echo "s%@tape_drive1@%${5}%g" >>${out}
 echo "s%@smtp_host@%${6}%g" >>${out}
index 6fe38d0bb2726bac73e99fa40b7b92154026b388..5225103a89ad3ea51dbade59198d2422ba794779 100755 (executable)
@@ -27,7 +27,7 @@ echo " === Starting bscan-tape at `date +%R:%S` ===" >>working/log
 echo " "
 
 cat <<END_OF_DATA >tmp/bconcmds
-@$out /dev/null
+@output /dev/null
 estimate job=NightlySave listing
 estimate job=NightlySave listing
 estimate job=NightlySave listing
index cff1a52022543611d70894c9d0c081e861858d99..3e854da219ec73ce635f8bfcdd9da8b9908d63d5 100755 (executable)
@@ -51,6 +51,7 @@ messages
 quit
 END_OF_DATA
 
+# run backup
 if test "$debug" -eq 1 ; then
   bin/bacula start
   cat tmp/bconcmds | bin/bconsole -c bin/bconsole.conf
@@ -62,17 +63,21 @@ fi
 scripts/check_for_zombie_jobs storage=File1
 bin/bacula stop 2>&1 >/dev/null
 echo "volume=TestVolume001|TestVolume002" >tmp/bscan.bsr
-bin/bscan -w working -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf ${cwd}/tmp 2>&1 >/dev/null
-#bin/bscan -w working -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf ${cwd}/tmp
-bin/bacula start 2>&1 >/dev/null
-bin/bconsole -c bin/bconsole.conf <<END_OF_DATA 2>&1 >/dev/null
-#bin/bconsole -c bin/bconsole.conf <<END_OF_DATA
+
+if test "$debug" -eq 1 ; then
+  bin/bscan -w working -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf ${cwd}/tmp
+else
+  bin/bscan -w working -m -s -v -b tmp/bscan.bsr -c bin/bacula-sd.conf ${cwd}/tmp 2>&1 >/dev/null
+fi
+
+cat <<END_OF_DATA >tmp/bconcmds
 @$out /dev/null
 messages
 @$out tmp/log2.out
 @# 
 @# now do a restore
 @#
+@#setdebug level=400 storage=File1
 restore bootstrap=${cwd}/tmp/kern.bsr where=${cwd}/tmp/bacula-restores select all storage=File1 done
 yes
 wait
@@ -80,6 +85,17 @@ messages
 @$out
 quit
 END_OF_DATA
+
+# now run restore
+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
+
+
 scripts/check_for_zombie_jobs storage=File1
 bin/bacula stop 2>&1 >/dev/null
 grep "^  Termination: *Backup OK" tmp/log1.out 2>&1 >/dev/null