]> git.sur5r.net Git - bacula/bacula/commitdiff
Update
authorKern Sibbald <kern@sibbald.com>
Sat, 16 Aug 2008 08:53:11 +0000 (08:53 +0000)
committerKern Sibbald <kern@sibbald.com>
Sat, 16 Aug 2008 08:53:11 +0000 (08:53 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7482 91ce42f0-d328-0410-95d8-f526ca767f89

25 files changed:
regress/scripts/prepare-disk-changer [new file with mode: 0755]
regress/scripts/prepare-two-disks [deleted file]
regress/tests/2drive-2disk
regress/tests/2drive-2job-test
regress/tests/2drive-3pool-test
regress/tests/2drive-concurrent-test
regress/tests/2drive-incremental-2disk
regress/tests/2drive-offline-test
regress/tests/2drive-swap-test
regress/tests/fast-two-pool-test
regress/tests/incremental-2disk
regress/tests/incremental-2media
regress/tests/migration-job-test
regress/tests/migration-jobspan-test
regress/tests/migration-occupancy-test
regress/tests/migration-time-test
regress/tests/migration-volume-test
regress/tests/scratch-pool-test
regress/tests/three-pool-recycle-test
regress/tests/three-pool-test
regress/tests/two-pool-test
regress/tests/two-volume-test
regress/tests/virtual-backup-test
regress/tests/virtual-backup2-test [new file with mode: 0755]
regress/tests/virtual-changer-test

diff --git a/regress/scripts/prepare-disk-changer b/regress/scripts/prepare-disk-changer
new file mode 100755 (executable)
index 0000000..d0cce46
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+#
+# Create fresh virtual disk changer directory
+#
+rm -rf tmp/disk-changer
+mkdir tmp/disk-changer
+# Create 10 slots
+for i in 1 2 3 4 5 6 7 8 9 10 ; do
+   touch tmp/disk-changer/slot$i
+done
diff --git a/regress/scripts/prepare-two-disks b/regress/scripts/prepare-two-disks
deleted file mode 100755 (executable)
index d0cce46..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-#
-# Create fresh virtual disk changer directory
-#
-rm -rf tmp/disk-changer
-mkdir tmp/disk-changer
-# Create 10 slots
-for i in 1 2 3 4 5 6 7 8 9 10 ; do
-   touch tmp/disk-changer/slot$i
-done
index ae84936dbf17c17e28c97bf98ec3cf40bbc61ace..67450591db2cf5fa61e23a1a9e350e30c39e4043 100755 (executable)
@@ -11,7 +11,7 @@ JobName="2drive2disk"
 
 scripts/cleanup
 scripts/copy-2disk-drive-confs
-scripts/prepare-two-disks
+scripts/prepare-disk-changer
 
 CLIENT=2drive2disk
 
index 89a8c2cb471eb46a87a22ff76e31a65351b8a1cc..fd3b19a004bd830d8aca981a06db999d02e470bc 100755 (executable)
@@ -11,7 +11,7 @@ JobName="2drive2job"
 
 scripts/cleanup
 scripts/copy-2disk-drive-confs
-scripts/prepare-two-disks
+scripts/prepare-disk-changer
 CLIENT=2drive2disk
 
 change_jobname NightlySave $JobName
index 5bc6259f560d15e13eeff1ab99a783aa0f2ebe0e..6a7d91bbd913152f2ac80a1aa6d3c0f429bd8c64 100755 (executable)
@@ -13,7 +13,7 @@ JobName="2dr3pooldisk"
 
 scripts/cleanup
 scripts/copy-2disk-drive-confs
-scripts/prepare-two-disks
+scripts/prepare-disk-changer
 CLIENT=2drive2disk
 
 echo "${cwd}/build" >${cwd}/tmp/file-list
index 44f5bd07a932e697e37e949c459a75d25b1bb974..038b9ad3963fc01991ff717bd8531c9676a4cfa2 100755 (executable)
@@ -11,7 +11,7 @@ JobName=Four-concurrent-jobs
 
 scripts/cleanup
 scripts/copy-2disk-drive-confs
-scripts/prepare-two-disks
+scripts/prepare-disk-changer
 CLIENT=2drive2disk
 
 echo "${cwd}/build" >${cwd}/tmp/file-list
index 334d578380edd0f0de61c64cc0036dcec27fab84..43863d8b7832601bf14e66db4124c819ecfb8103 100755 (executable)
@@ -11,7 +11,7 @@ JobName="2drive2disk"
 
 scripts/cleanup
 scripts/copy-2disk-drive-confs
-scripts/prepare-two-disks
+scripts/prepare-disk-changer
 CLIENT=2drive2disk
 
 change_jobname localhost-fd $JobName
index 3f16b9adef1dd1290c7cafdcaba166cac479e0b0..93c63918b80826018501c7fa33ae911484fd906c 100755 (executable)
@@ -14,7 +14,7 @@ JobName="2driveoffline"
 
 scripts/cleanup
 scripts/copy-2disk-drive-confs
-scripts/prepare-two-disks
+scripts/prepare-disk-changer
 CLIENT=2drive2disk
 
 change_jobname NightlySave $JobName
index 33d446543b5890dddd615249a0c267739cd7b5ff..d96f6e8b160cced0ffac33990db7c1d97adf4712 100755 (executable)
@@ -11,7 +11,7 @@ JobName="2drive-swap"
 
 scripts/cleanup
 scripts/copy-2disk-drive-confs
-scripts/prepare-two-disks
+scripts/prepare-disk-changer
 CLIENT=2drive2disk
 
 change_jobname NightlySave $JobName
index 3087733b96f83236c99898dbfc7bdf59fd5061cf..dc9101a3ae839aa4c5c0391ab2eb5f8e3f5cd380 100755 (executable)
@@ -15,7 +15,7 @@ JobName=Fast-two-pool
 
 scripts/cleanup
 scripts/copy-2disk-confs
-scripts/prepare-two-disks
+scripts/prepare-disk-changer
  
 # Make a relatively large backup set 5 x source code directory
 #  Reduced to 1 for portable
index 63098bcd9b694d0c34dde01e4cb848acb504138a..1c1efb4c0005c7f9d9b9ede5f6af95243333d911 100755 (executable)
@@ -18,7 +18,7 @@ cd bin
 cd ..
 
 scripts/copy-2disk-confs
-scripts/prepare-two-disks
+scripts/prepare-disk-changer
 
 echo "${cwd}/tmp/build" >${cwd}/tmp/file-list
 if test ! -d ${cwd}/tmp/build ; then
index d8ef6b15e7085ac189949f63e1d3b7ea267c7667..ba7a5373eb30bac4c1d6f39089742b85885ade7b 100755 (executable)
@@ -13,7 +13,7 @@ JobName=Inc2media
 
 scripts/cleanup
 scripts/copy-2disk-confs
-scripts/prepare-two-disks
+scripts/prepare-disk-changer
 echo "${cwd}/build" >${cwd}/tmp/file-list
 
 change_jobname $JobName
index ac0ea2b979183f8ed5b3a2e2d46cc745853a3459..2fc38a8509815dbe913d1c0be750392413ceb827 100755 (executable)
@@ -12,7 +12,7 @@ JobName=MigrationJobSave
 
 scripts/cleanup
 scripts/copy-migration-confs
-scripts/prepare-two-disks
+scripts/prepare-disk-changer
 echo "${cwd}/build" >${cwd}/tmp/file-list
 
 change_jobname NightlySave $JobName
index 6910dde4bdec277c1a8ca5b44399a84efd908746..f62bd936e468a46a2a4dc4ece26e857417bf70eb 100755 (executable)
@@ -14,7 +14,7 @@ JobName=MigrationJobSpanSave
 
 scripts/cleanup
 scripts/copy-migration-confs
-scripts/prepare-two-disks
+scripts/prepare-disk-changer
 echo "${cwd}/build" >${cwd}/tmp/file-list
 cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
 sed "s%# Maximum File Size%  Maximum File Size%" ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
index 5f19481677d6b7919b8ecd213d10f4127ddbaf80..21a0d48ecc0def2ab10ffb328dba13d60c141ca0 100755 (executable)
@@ -12,7 +12,7 @@ JobName=MigrationJobSave
 
 scripts/cleanup
 scripts/copy-migration-confs
-scripts/prepare-two-disks
+scripts/prepare-disk-changer
 echo "${cwd}/build" >${cwd}/tmp/file-list
 
 change_jobname NightlySave $JobName
index 96e968bb021d01920cf2240667add65ca7fc652c..a1846e447deca2c71f1eccfc9caf328b519e8a95 100755 (executable)
@@ -12,7 +12,7 @@ JobName=MigrationJobSave
 
 scripts/cleanup
 scripts/copy-migration-confs
-scripts/prepare-two-disks
+scripts/prepare-disk-changer
 echo "${cwd}/build" >${cwd}/tmp/file-list
 
 change_jobname NightlySave $JobName
index 2d5e57885c68095b7429a7196410965fa96bc514..13f7e67196fcd9409a06f844de3c7f5bb0f03797 100755 (executable)
@@ -12,7 +12,7 @@ JobName=MigVolBackup
 
 scripts/cleanup
 scripts/copy-migration-confs
-scripts/prepare-two-disks
+scripts/prepare-disk-changer
 echo "${cwd}/build" >${cwd}/tmp/file-list
 #cp ${cwd}/bin/bacula-sd.conf ${cwd}/tmp/1
 #sed "s%# Maximum File Size%  Maximum File Size%" ${cwd}/tmp/1 >${cwd}/bin/bacula-sd.conf
index 47a8cb96e8a7b86e07b962f957788211c6d05fa6..11016ff4edc50f9dcb71354f5e55861a30751768 100755 (executable)
@@ -22,7 +22,7 @@ fi
 cwd=`pwd`
 scripts/cleanup
 scripts/copy-2disk-confs
-scripts/prepare-two-disks
+scripts/prepare-disk-changer
  
 echo "${cwd}/build" >${cwd}/tmp/file-list
 
index 57790ce9e68711b05be7e4f63886d15dabed87df..0069935c67f6ad32230af19ee5b7771fd5a9dfdb 100755 (executable)
@@ -16,7 +16,7 @@ JobName=Three-pool-recycle
 cwd=`pwd`
 scripts/cleanup
 scripts/copy-2disk-confs
-scripts/prepare-two-disks
+scripts/prepare-disk-changer
 
 # remove Client Run Before Job
 cp ${cwd}/bin/bacula-dir.conf ${cwd}/tmp/1
index ba4597f3765693fcccfc8772a97d87d6d74bc36b..2eaf7d0c48b17ab4ac93b35fc40eccb11aacd6cf 100755 (executable)
@@ -13,7 +13,7 @@ JobName="threepooldisk"
 
 scripts/cleanup
 scripts/copy-2disk-drive-confs
-scripts/prepare-two-disks
+scripts/prepare-disk-changer
 CLIENT=2drive2disk
 
 echo "${cwd}/build" >${cwd}/tmp/file-list
index b5d235ae197ba2c47b033b54a09a33019945c17f..b0a48ec6451344557540da4e85a9fb4f02b76fc3 100755 (executable)
@@ -16,7 +16,7 @@ JobName=Two-pool
 cwd=`pwd`
 scripts/cleanup
 scripts/copy-2disk-confs
-scripts/prepare-two-disks
+scripts/prepare-disk-changer
  
 # Make a relatively large backup set 5 x source code directory
 #  Reduced to 1 for portable
index 920beb57ac68bab9d52e7454411266f848d9ab7b..84a4228d3e4395a9d4c5bb8234b6ca31ec84149e 100755 (executable)
@@ -14,7 +14,7 @@ JobName=TwoVolume
 cwd=`pwd`
 scripts/cleanup
 scripts/copy-2disk-confs
-scripts/prepare-two-disks
+scripts/prepare-disk-changer
  
 echo "${cwd}/build" >${cwd}/tmp/file-list
 
index 1ff14eac499f2b47febebae62c5f97b3cd994a71..700f2c1c6cabb80bddb2e050ec8d136cf5d7d92d 100755 (executable)
@@ -12,7 +12,7 @@ JobName=Vbackup
 
 scripts/cleanup
 scripts/copy-migration-confs
-scripts/prepare-two-disks
+scripts/prepare-disk-changer
 echo "${cwd}/build" >${cwd}/tmp/file-list
 
 change_jobname NightlySave $JobName
@@ -55,7 +55,7 @@ messages
 list jobs
 list volumes
 @# 
-@# now do a restore
+@# now do a normal restore of normal backups
 @#
 @$out ${cwd}/tmp/log2.out
 restore where=${cwd}/tmp/bacula-restores select
@@ -73,7 +73,7 @@ messages
 list volumes
 list jobs
 @# 
-@# now do a restore
+@# now do a restore of the consolidated Full
 @#
 @$out ${cwd}/tmp/log2.out
 restore where=${cwd}/tmp/bacula-restores select storage=DiskChanger
@@ -82,36 +82,6 @@ mark *
 done
 yes
 wait
-update Volume=ChangerVolume002
-11
-Default
-list volumes
-list jobs
-messages
-@exec "sh -c 'touch ${cwd}/build/src/dird/*.o'"
-run job=$JobName level=Incremental yes
-wait
-messages
-list jobs
-list volumes
-@# Now do another Consolidation
-setdebug level=150 storage=DiskChanger
-run job=$JobName level=VirtualFull yes
-wait
-messages
-list volumes
-list jobs
-@# 
-@# now do a restore
-@#
-@$out ${cwd}/tmp/log2.out
-setdebug level=0 storage=DiskChanger
-restore where=${cwd}/tmp/bacula-restores select storage=DiskChanger
-unmark *
-mark *
-done
-yes
-wait
 list volumes
 list jobs
 messages
diff --git a/regress/tests/virtual-backup2-test b/regress/tests/virtual-backup2-test
new file mode 100755 (executable)
index 0000000..0a0029d
--- /dev/null
@@ -0,0 +1,129 @@
+#!/bin/sh
+#
+# Run a simple backup of the Bacula build directory then do a virtual
+#   backup to another device.
+#
+# This script uses the virtual disk autochanger
+#
+TestName="virtual-backup-test"
+JobName=Vbackup
+. scripts/functions
+
+
+scripts/cleanup
+scripts/copy-migration-confs
+scripts/prepare-disk-changer
+echo "${cwd}/build" >${cwd}/tmp/file-list
+
+change_jobname NightlySave $JobName
+start_test
+
+#
+# Note, we first backup into Pool Default, 
+#          then Migrate into Pool Full. 
+#              Pool Default forced to use Storage=DiskChanger
+#              Pool Full    uses Storage=DiskChanger
+
+# Write out bconsole commands
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
+@output
+messages
+@$out ${cwd}/tmp/log1.out
+setdebug level=150 storage=DiskChanger
+label storage=DiskChanger volume=ChangerVolume001 slot=1 Pool=Full drive=0
+label storage=DiskChanger volume=ChangerVolume002 slot=2 Pool=Full drive=0
+label storage=DiskChanger volume=ChangerVolume003 slot=3 Pool=Full drive=0
+setdebug level=0 storage=DiskChanger
+@# run several jobs
+run job=$JobName level=Full yes
+wait
+messages
+list jobs
+@exec "sh -c 'touch ${cwd}/build/src/dird/*.c'"
+run job=$JobName level=Incremental storage=DiskChanger yes
+wait
+messages
+list jobs
+@exec "sh -c 'touch ${cwd}/build/src/dird/*.o'"
+run job=$JobName level=Differential storage=DiskChanger yes
+wait
+messages
+list jobs
+@exec "sh -c 'touch ${cwd}/build/src/dird/*.o'"
+run job=$JobName level=Incremental storage=DiskChanger yes
+wait
+messages
+list jobs
+list volumes
+@# 
+@# now do a restore
+@#
+@$out ${cwd}/tmp/log2.out
+restore where=${cwd}/tmp/bacula-restores select
+unmark *
+mark *
+done
+yes
+list volumes
+@#setdebug level=100 dir
+@# should Consolidate Full, Differential and Incremental
+@#setdebug level=51 storage=DiskChanger
+run job=$JobName level=VirtualFull storage=DiskChanger yes
+wait
+messages
+list volumes
+list jobs
+@# 
+@# now do a restore
+@#
+@$out ${cwd}/tmp/log2.out
+restore where=${cwd}/tmp/bacula-restores select storage=DiskChanger
+unmark *
+mark *
+done
+yes
+wait
+update Volume=ChangerVolume002
+11
+Default
+list volumes
+list jobs
+messages
+@exec "sh -c 'touch ${cwd}/build/src/dird/*.o'"
+run job=$JobName level=Incremental storage=DiskChanger yes
+wait
+messages
+list jobs
+list volumes
+@# Now do another Consolidation
+setdebug level=150 storage=DiskChanger
+run job=$JobName level=VirtualFull storage=DiskChanger yes
+wait
+messages
+list volumes
+list jobs
+@# 
+@# now do a restore
+@#
+@$out ${cwd}/tmp/log2.out
+setdebug level=0 storage=DiskChanger
+restore where=${cwd}/tmp/bacula-restores select storage=DiskChanger
+unmark *
+mark *
+done
+yes
+wait
+list volumes
+list jobs
+messages
+@output
+quit
+END_OF_DATA
+
+run_bacula
+check_for_zombie_jobs storage=File
+stop_bacula
+
+check_two_logs
+check_restore_diff
+end_test
index 5e53437492d49621109e09824c95ac69f9b5ee1c..30a371bf8a49fb6f8cdf7350e33efdd8ed4ca03d 100755 (executable)
@@ -13,7 +13,7 @@ JobName="virtualchangerdisk"
 
 scripts/cleanup
 scripts/copy-2disk-drive-confs
-scripts/prepare-two-disks
+scripts/prepare-disk-changer
 
 CLIENT=2drive2disk