rm -rf tmp/build tmp/restore-list tmp/restore2-list
rm -rf tmp/fd.out tmp/dir.out tmp/sd.out
rm -rf working/log tmp/TEST-*
-rm -rf working/*restore*.bsr
+rm -rf working/*.bsr
+rm -rf tmp/disk-changer /tmp/disk-changer
bin/bacula stop 2>&1 >/dev/null
cd bin
# This script uses the virtual disk autochanger
#
TestName="migration-volume-test"
-JobName=MigrationVolSave
+JobName=MigVolBackup
. scripts/functions
set_debug 1
list volumes
@# run two jobs (both will be migrated)
run job=$JobName yes
+wait
run job=$JobName yes
+@sleep 1
+status storage=File
+@sleep 1
+status storage=File
+@sleep 1
+status storage=File
wait
update volume=FileVolume001 VolStatus=Used
list volumes
@# should migrate two jobs
run job=migrate-volume yes
list volumes
+@sleep 3
+status storage=DiskChanger
+@sleep 1
+status storage=DiskChanger
+@sleep 1
+status storage=DiskChanger
wait
messages
@#
check_two_logs
check_restore_diff
-exit
end_test
TestName="two-volume-test"
JobName=TwoVolume
. scripts/functions
-set_debug 0
+set_debug 1
. config.out
-if test x${AUTOCHANGER} = x/dev/null ; then
- echo "two-volume-test skipped. No autochanger."
- exit
-fi
+
cwd=`pwd`
scripts/cleanup
scripts/copy-2disk-confs