]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/backup-bacula-test
regress: change /bin/sleep to sleep
[bacula/bacula] / regress / tests / backup-bacula-test
index 2c6d8e24cd3081dc4df422f77b59d8be4018d175..d856ff6e228d76cbfbb0af176c606851351915b2 100755 (executable)
@@ -6,21 +6,29 @@
 TestName="backup-bacula-test"
 JobName=backup
 . scripts/functions
-set_debug 0
 
-cwd=`pwd`
-scripts/copy-confs
 scripts/cleanup
+scripts/copy-confs
 
+#
+# Zap out any schedule in default conf file so that
+#  it doesn't start during our test
+#
+outf="$tmp/sed_tmp"
+echo "s%  Schedule =%# Schedule =%g" >${outf}
+cp $scripts/bacula-dir.conf $tmp/1
+sed -f ${outf} $tmp/1 >$scripts/bacula-dir.conf
+
+change_jobname BackupClient1 $JobName
 start_test
 
-cat <<END_OF_DATA >tmp/bconcmds
-@output /dev/null
+cat <<END_OF_DATA >$tmp/bconcmds
+@$out /dev/null
 messages
-@$out tmp/log1.out
-label volume=TestVolume001
-@#setdebug level=100 storage=File
-run job=Client1 yes
+@$out $tmp/log1.out
+setdebug level=100 storage=File
+label volume=TestVolume001 storage=File pool=File
+run job=$JobName yes
 status storage=File
 status storage=File
 status storage=File
@@ -44,17 +52,46 @@ messages
 @# 
 @# now do a restore
 @#
-@$out tmp/log2.out  
-restore where=${cwd}/tmp/bacula-restores select all done
+@$out $tmp/log2.out  
+restore where=$tmp/bacula-restores select all done
+yes
+wait
+messages
+quit
+END_OF_DATA
+
+run_bacula
+check_for_zombie_jobs storage=File
+stop_bacula
+
+cat <<END_OF_DATA >$tmp/bconcmds
+@$out /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
 
+#
+# 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 storate=File
+check_for_zombie_jobs storage=File
 stop_bacula
 
 check_two_logs