]> git.sur5r.net Git - bacula/bacula/blobdiff - regress/tests/copy-job-test
Make out of freespace non-fatal for removable devices -- i.e. behaves like tape
[bacula/bacula] / regress / tests / copy-job-test
index b19368ecf8c75abb047c2298ca5007d043b36d28..da6922cb7b33db3a0850458f4261949d7b573cc1 100755 (executable)
@@ -1,5 +1,8 @@
 #!/bin/sh
 #
+# Copyright (C) 2000-2017 Kern Sibbald
+# License: BSD 2-Clause; see file LICENSE-FOSS
+#
 # Run a simple backup of the Bacula build directory then copy it
 #   to another device.
 #
@@ -12,10 +15,9 @@ JobName=CopyJobSave
 
 scripts/cleanup
 scripts/copy-migration-confs
-scripts/prepare-disk-changer
 echo "${cwd}/build" >${cwd}/tmp/file-list
-sed -i 's/migrate/copy/g' ${cwd}/bin/bacula-dir.conf
-sed -i 's/Migrate/Copy/g' ${cwd}/bin/bacula-dir.conf
+sed 's/migrate/copy/g' ${cwd}/bin/bacula-dir.conf > ${cwd}/tmp/1
+sed 's/Migrate/Copy/g' ${cwd}/tmp/1 > ${cwd}/bin/bacula-dir.conf
 
 
 change_jobname NightlySave $JobName
@@ -29,26 +31,28 @@ start_test
 
 # Write out bconsole commands
 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
-@output
+@output /dev/null
 messages
 @$out ${cwd}/tmp/log1.out
-setdebug level=100 storage=File
+@# setdebug level=100 storage=File
 label storage=File volume=FileVolume001 Pool=Default
 label storage=DiskChanger volume=ChangerVolume001 slot=1 Pool=Full drive=0
 label storage=DiskChanger volume=ChangerVolume002 slot=2 Pool=Full drive=0
 @# run two jobs (both will be copied)
 run job=$JobName yes
 run job=$JobName yes
+run job=$JobName yes
 wait
 list jobs
 list volumes
 @#setdebug level=100 dir
 @# should copy two jobs
 @#setdebug level=51 storage=DiskChanger
+@#setdebug level=100 storage=File tags=dedup,asx,network options=h
 run job=copy-job yes
 wait
 messages
-purge volume=FileVolume001
+@#purge volume=FileVolume001
 list jobs 
 list volumes
 wait
@@ -69,7 +73,11 @@ list jobs
 @#
 @$out ${cwd}/tmp/log2.out
 list volumes 
-restore where=${cwd}/tmp/bacula-restores select storage=DiskChanger
+@#setdebug level=15 director
+@#setdebug level=150 storage=DiskChanger
+@# Note, here we are restoring from the original backup,
+@#  so if you specify storage=DiskChanger the restore will fail
+restore where=${cwd}/tmp/bacula-restores select
 unmark *
 mark *
 done
@@ -77,7 +85,6 @@ yes
 list volumes
 wait
 messages
-@output
 quit
 END_OF_DATA