From: Kern Sibbald Date: Mon, 18 Feb 2013 08:24:59 +0000 (+0100) Subject: Add virtualfull-extreme test X-Git-Url: https://git.sur5r.net/?p=bacula%2Fbacula;a=commitdiff_plain;h=247ecce77af0dd655ce81eb554630bcb76751ba3 Add virtualfull-extreme test --- diff --git a/regress/scripts/do_sed b/regress/scripts/do_sed index 3362d6df32..1cf9043b3f 100755 --- a/regress/scripts/do_sed +++ b/regress/scripts/do_sed @@ -22,6 +22,7 @@ sed -f ${out} ${rscripts}/testb-bacula-dir.conf.in >${rscripts}/testb-bacula-dir sed -f ${out} ${rscripts}/test-bacula-fd.conf.in >${rscripts}/test-bacula-fd.conf sed -f ${out} ${rscripts}/test-bacula-sd.conf.in >${rscripts}/test-bacula-sd.conf sed -f ${out} ${rscripts}/test-console.conf.in >${rscripts}/test-console.conf +sed -f ${out} ${rscripts}/virtualfull-extreme-bacula-dir.conf.in >${rscripts}/virtualfull-extreme-bacula-dir.conf sed -f ${out} ${rscripts}/crypto-bacula-fd.conf.in >${rscripts}/crypto-bacula-fd.conf sed -f ${out} ${rscripts}/bacula-dir-tape.conf.in >${rscripts}/bacula-dir-tape.conf sed -f ${out} ${rscripts}/bacula-dir-2client.conf.in >${rscripts}/bacula-dir-2client.conf diff --git a/regress/scripts/virtualfull-extreme-bacula-dir.conf.in b/regress/scripts/virtualfull-extreme-bacula-dir.conf.in new file mode 100644 index 0000000000..9f1b382d28 --- /dev/null +++ b/regress/scripts/virtualfull-extreme-bacula-dir.conf.in @@ -0,0 +1,737 @@ +# +# Test for finding Virtual Full errors. Essential +# parts supplied by Arno +# + +Director { # define myself + Name = @hostname@-dir + DIRPort = @dirport@ # where we listen for UA connections + QueryFile = "@scriptdir@/query.sql" + WorkingDirectory = "@working_dir@" + PidDirectory = "@piddir@" + PluginDirectory = "@sbindir@" + Maximum Concurrent Jobs = 51 + Heartbeat Interval = 330 + Password = "pNvX1WiXnwv2C/F7E52LGvw6rKjbbPvu2kyuPa9pVaL3" # Console password + Messages = Standard +} + +File Set { + Name = "IncrData" + Include { + Options { + Signature = SHA1 + Accurate = pnugsiamc + Verify = pnugsiamc1 + No atime = Yes + ACL Support = Yes + Compression = LZO + } + File = <@tmpdir@/file-list + } +} + +Client { + Name = Fake + Address = @hostname@ + FDPort = @fdport@ + Catalog = MyCatalog + Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" + Maximum Concurrent Jobs = 20 +} + +Job { + Name = "HotMig" + Type = Migrate + Client = Fake + File Set = "IncrData" + Messages = "Standard" + Priority = 10 + Maximum Concurrent Jobs = 2 + Enabled = No + Pool = "Hot1" + Selection Type = Job + Selection Pattern = ".*" +} + +# Automated configuration for Hot-test Virtual Full Backups +Job { + Name = "HotV01" + Type = Backup + Level = Incremental + Client = "HotV01-fd" + File Set = "IncrData" + Accurate = Yes + Storage = File + Pool = "Hot1" + Messages = "Standard" + Priority = 10 + Write Bootstrap = "@working_dir@/%n.bsr" + Enabled = No + Maximum Concurrent Jobs = 1 +} + +Client { + Name = HotV01-fd + Address = @hostname@ + FDPort = @fdport@ + Catalog = MyCatalog + Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" + File Retention = 6 months + Job Retention = 6 months # six months + AutoPrune = yes # Prune expired Jobs/Files +} + + +Job { + Name = "HotV02" + Type = Backup + Level = Incremental + Client = "HotV02-fd" + File Set = "IncrData" + Accurate = Yes + Storage = File + Pool = "Hot1" + Messages = "Standard" + Priority = 10 + Write Bootstrap = "@working_dir@/%n.bsr" + Enabled = No + Maximum Concurrent Jobs = 1 +} + +Client { + Name = HotV02-fd + Address = @hostname@ + FDPort = @fdport@ + Catalog = MyCatalog + Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon + File Retention = 6 months + Job Retention = 6 months # six months + AutoPrune = yes # Prune expired Jobs/Files +} + + +Job { + Name = "HotV03" + Type = Backup + Level = Incremental + Client = "HotV03-fd" + File Set = "IncrData" + Accurate = Yes + Storage = File + Pool = "Hot1" + Messages = "Standard" + Priority = 10 + Write Bootstrap = "@working_dir@/%n.bsr" + Enabled = No + Maximum Concurrent Jobs = 1 +} + +Client { + Name = HotV03-fd + Address = @hostname@ + FDPort = @fdport@ + Catalog = MyCatalog + Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon + File Retention = 6 months + Job Retention = 6 months # six months + AutoPrune = yes # Prune expired Jobs/Files +} + + +Job { + Name = "HotV04" + Type = Backup + Level = Incremental + Client = "HotV04-fd" + File Set = "IncrData" + Accurate = Yes + Storage = File + Pool = "Hot1" + Messages = "Standard" + Priority = 10 + Write Bootstrap = "@working_dir@/%n.bsr" + Enabled = No + Maximum Concurrent Jobs = 1 +} + +Client { + Name = HotV04-fd + Address = @hostname@ + FDPort = @fdport@ + Catalog = MyCatalog + Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon + File Retention = 6 months + Job Retention = 6 months # six months + AutoPrune = yes # Prune expired Jobs/Files +} + + +Job { + Name = "HotV05" + Type = Backup + Level = Incremental + Client = "HotV05-fd" + File Set = "IncrData" + Accurate = Yes + Storage = File + Pool = "Hot1" + Messages = "Standard" + Priority = 10 + Write Bootstrap = "@working_dir@/%n.bsr" + Enabled = No + Maximum Concurrent Jobs = 1 +} + +Client { + Name = HotV05-fd + Address = @hostname@ + FDPort = @fdport@ + Catalog = MyCatalog + Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon + File Retention = 6 months + Job Retention = 6 months # six months + AutoPrune = yes # Prune expired Jobs/Files +} + + +Job { + Name = "HotV06" + Type = Backup + Level = Incremental + Client = "HotV06-fd" + File Set = "IncrData" + Accurate = Yes + Storage = File + Pool = "Hot1" + Messages = "Standard" + Priority = 10 + Write Bootstrap = "@working_dir@/%n.bsr" + Enabled = No + Maximum Concurrent Jobs = 1 +} + +Client { + Name = HotV06-fd + Address = @hostname@ + FDPort = @fdport@ + Catalog = MyCatalog + Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon + File Retention = 6 months + Job Retention = 6 months # six months + AutoPrune = yes # Prune expired Jobs/Files +} + + +Job { + Name = "HotV07" + Type = Backup + Level = Incremental + Client = "HotV07-fd" + File Set = "IncrData" + Accurate = Yes + Storage = File + Pool = "Hot1" + Messages = "Standard" + Priority = 10 + Write Bootstrap = "@working_dir@/%n.bsr" + Enabled = No + Maximum Concurrent Jobs = 1 +} + +Client { + Name = HotV07-fd + Address = @hostname@ + FDPort = @fdport@ + Catalog = MyCatalog + Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon + File Retention = 6 months + Job Retention = 6 months # six months + AutoPrune = yes # Prune expired Jobs/Files +} + + +Job { + Name = "HotV08" + Type = Backup + Level = Incremental + Client = "HotV08-fd" + File Set = "IncrData" + Accurate = Yes + Storage = File + Pool = "Hot1" + Messages = "Standard" + Priority = 10 + Write Bootstrap = "@working_dir@/%n.bsr" + Enabled = No + Maximum Concurrent Jobs = 1 +} + +Client { + Name = HotV08-fd + Address = @hostname@ + FDPort = @fdport@ + Catalog = MyCatalog + Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon + File Retention = 6 months + Job Retention = 6 months # six months + AutoPrune = yes # Prune expired Jobs/Files +} + + +Job { + Name = "HotV09" + Type = Backup + Level = Incremental + Client = "HotV09-fd" + File Set = "IncrData" + Accurate = Yes + Storage = File + Pool = "Hot1" + Messages = "Standard" + Priority = 10 + Write Bootstrap = "@working_dir@/%n.bsr" + Enabled = No + Maximum Concurrent Jobs = 1 +} + +Client { + Name = HotV09-fd + Address = @hostname@ + FDPort = @fdport@ + Catalog = MyCatalog + Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon + File Retention = 6 months + Job Retention = 6 months # six months + AutoPrune = yes # Prune expired Jobs/Files +} + + +Job { + Name = "HotV10" + Type = Backup + Level = Incremental + Client = "HotV10-fd" + File Set = "IncrData" + Accurate = Yes + Storage = File + Pool = "Hot1" + Messages = "Standard" + Priority = 10 + Write Bootstrap = "@working_dir@/%n.bsr" + Enabled = No + Maximum Concurrent Jobs = 1 +} + +Client { + Name = HotV10-fd + Address = @hostname@ + FDPort = @fdport@ + Catalog = MyCatalog + Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon + File Retention = 6 months + Job Retention = 6 months # six months + AutoPrune = yes # Prune expired Jobs/Files +} + + +Job { + Name = "HotV11" + Type = Backup + Level = Incremental + Client = "HotV11-fd" + File Set = "IncrData" + Accurate = Yes + Storage = File + Pool = "Hot1" + Messages = "Standard" + Priority = 10 + Write Bootstrap = "@working_dir@/%n.bsr" + Enabled = No + Maximum Concurrent Jobs = 1 +} + +Client { + Name = HotV11-fd + Address = @hostname@ + FDPort = @fdport@ + Catalog = MyCatalog + Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon + File Retention = 6 months + Job Retention = 6 months # six months + AutoPrune = yes # Prune expired Jobs/Files +} + + +Job { + Name = "HotV12" + Type = Backup + Level = Incremental + Client = "HotV12-fd" + File Set = "IncrData" + Accurate = Yes + Storage = File + Pool = "Hot1" + Messages = "Standard" + Priority = 10 + Write Bootstrap = "@working_dir@/%n.bsr" + Enabled = No + Maximum Concurrent Jobs = 1 +} + +Client { + Name = HotV12-fd + Address = @hostname@ + FDPort = @fdport@ + Catalog = MyCatalog + Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon + File Retention = 6 months + Job Retention = 6 months # six months + AutoPrune = yes # Prune expired Jobs/Files +} + + +Job { + Name = "HotV13" + Type = Backup + Level = Incremental + Client = "HotV13-fd" + File Set = "IncrData" + Accurate = Yes + Storage = File + Pool = "Hot1" + Messages = "Standard" + Priority = 10 + Write Bootstrap = "@working_dir@/%n.bsr" + Enabled = No + Maximum Concurrent Jobs = 1 +} + +Client { + Name = HotV13-fd + Address = @hostname@ + FDPort = @fdport@ + Catalog = MyCatalog + Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon + File Retention = 6 months + Job Retention = 6 months # six months + AutoPrune = yes # Prune expired Jobs/Files +} + + +Job { + Name = "HotV14" + Type = Backup + Level = Incremental + Client = "HotV14-fd" + File Set = "IncrData" + Accurate = Yes + Storage = File + Pool = "Hot1" + Messages = "Standard" + Priority = 10 + Write Bootstrap = "@working_dir@/%n.bsr" + Enabled = No + Maximum Concurrent Jobs = 1 +} + +Client { + Name = HotV14-fd + Address = @hostname@ + FDPort = @fdport@ + Catalog = MyCatalog + Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon + File Retention = 6 months + Job Retention = 6 months # six months + AutoPrune = yes # Prune expired Jobs/Files +} + + +Job { + Name = "HotV15" + Type = Backup + Level = Incremental + Client = "HotV15-fd" + File Set = "IncrData" + Accurate = Yes + Storage = File + Pool = "Hot1" + Messages = "Standard" + Priority = 10 + Write Bootstrap = "@working_dir@/%n.bsr" + Enabled = No + Maximum Concurrent Jobs = 1 +} + +Client { + Name = HotV15-fd + Address = @hostname@ + FDPort = @fdport@ + Catalog = MyCatalog + Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon + File Retention = 6 months + Job Retention = 6 months # six months + AutoPrune = yes # Prune expired Jobs/Files +} + + +Job { + Name = "HotV16" + Type = Backup + Level = Incremental + Client = "HotV16-fd" + File Set = "IncrData" + Accurate = Yes + Storage = File + Pool = "Hot1" + Messages = "Standard" + Priority = 10 + Write Bootstrap = "@working_dir@/%n.bsr" + Enabled = No + Maximum Concurrent Jobs = 1 +} + +Client { + Name = HotV16-fd + Address = @hostname@ + FDPort = @fdport@ + Catalog = MyCatalog + Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon + File Retention = 6 months + Job Retention = 6 months # six months + AutoPrune = yes # Prune expired Jobs/Files +} + + +Job { + Name = "HotV17" + Type = Backup + Level = Incremental + Client = "HotV17-fd" + File Set = "IncrData" + Accurate = Yes + Storage = File + Pool = "Hot1" + Messages = "Standard" + Priority = 10 + Write Bootstrap = "@working_dir@/%n.bsr" + Enabled = No + Maximum Concurrent Jobs = 1 +} + +Client { + Name = HotV17-fd + Address = @hostname@ + FDPort = @fdport@ + Catalog = MyCatalog + Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon + File Retention = 6 months + Job Retention = 6 months # six months + AutoPrune = yes # Prune expired Jobs/Files +} + + +Job { + Name = "HotV18" + Type = Backup + Level = Incremental + Client = "HotV18-fd" + File Set = "IncrData" + Accurate = Yes + Storage = File + Pool = "Hot1" + Messages = "Standard" + Priority = 10 + Write Bootstrap = "@working_dir@/%n.bsr" + Enabled = No + Maximum Concurrent Jobs = 1 +} + +Client { + Name = HotV18-fd + Address = @hostname@ + FDPort = @fdport@ + Catalog = MyCatalog + Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon + File Retention = 6 months + Job Retention = 6 months # six months + AutoPrune = yes # Prune expired Jobs/Files +} + + +Job { + Name = "HotV19" + Type = Backup + Level = Incremental + Client = "HotV19-fd" + File Set = "IncrData" + Accurate = Yes + Storage = File + Pool = "Hot1" + Messages = "Standard" + Priority = 10 + Write Bootstrap = "@working_dir@/%n.bsr" + Enabled = No + Maximum Concurrent Jobs = 1 +} + +Client { + Name = HotV19-fd + Address = @hostname@ + FDPort = @fdport@ + Catalog = MyCatalog + Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon + File Retention = 6 months + Job Retention = 6 months # six months + AutoPrune = yes # Prune expired Jobs/Files +} + + +Job { + Name = "HotV20" + Type = Backup + Level = Incremental + Client = "HotV20-fd" + File Set = "IncrData" + Accurate = Yes + Storage = File + Pool = "Hot1" + Messages = "Standard" + Priority = 10 + Write Bootstrap = "@working_dir@/%n.bsr" + Enabled = No + Maximum Concurrent Jobs = 1 +} + +Client { + Name = HotV20-fd + Address = @hostname@ + FDPort = @fdport@ + Catalog = MyCatalog + Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon + File Retention = 6 months + Job Retention = 6 months # six months + AutoPrune = yes # Prune expired Jobs/Files +} + + +Storage { + Name = File + Address = @hostname@ + SDPort = @sdport@ + Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" + Device = VirtCh + Media Type = VirtMedia1 + Autochanger = Yes + Maximum Concurrent Jobs = 10 + Maximum Concurrent Read Jobs = 3 +} + +Storage { + Name = VirtA + Address = @hostname@ + SDPort = @sdport@ + Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" + Device = VirtCh + Media Type = VirtMedia0 + Autochanger = Yes + Maximum Concurrent Jobs = 10 +} + +Storage { + Name = VirtB + Address = @hostname@ + SDPort = @sdport@ + Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" + Device = VirtCh + Media Type = VirtMedia1 + Autochanger = Yes + Maximum Concurrent Jobs = 50 + Maximum Concurrent Read Jobs = 3 +} + + +Pool { + Name = "Hot1" + Pool Type = Backup + Storage = "VirtB" + Job Retention = 2 hours + File Retention = 100 min + Volume Retention = 3 hours + Maximum Volume Jobs = 7 + Label Format = "Hot1-" + Next Pool = "Hot2" +} + +Pool { + Name = "Hot2" + Pool Type = Backup + Storage = "VirtB" + Job Retention = 2 hours + File Retention = 100 min + Volume Retention = 3 hours + Maximum Volume Jobs = 7 + Label Format = "Hot2-" + Next Pool = "Hot3" +} + +Pool { + Name = "Hot3" + Pool Type = Backup + Storage = "VirtA" + Job Retention = 2 hours + File Retention = 105 min + Volume Retention = 2.5 hours + Maximum Volume Jobs = 1 + Label Format = "Hot3-" +} + + +# Standard Restore template, to be changed by Console program +Job { + Name = "RestoreFiles" + Type = Restore + Client = Fake + FileSet = "Full Set" + Storage = File + Messages = Standard + Pool = Hot1 + Where = @tmpdir@/bacula-restores + Max Run Time = 30min +} + + +# List of files to be backed up +FileSet { + Name = "Full Set" + Include { + Options { signature=MD5; + verify=pins5 } + File = <@tmpdir@/file-list + } +} + + +# Generic catalog service +Catalog { + Name = MyCatalog + dbname = @db_name@; user = @db_user@; password = "@db_password@" +} + +# Reasonable message delivery -- send most everything to email address +# and to the console +Messages { + Name = Standard + mailcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula regression\) %r\" -s \"Regression: %t %e of %c %l\" %r" + operatorcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula regression\) %r\" -s \"Regression: Intervention needed for %j\" %r" +# MailOnError = @job_email@ = all +# operator = @job_email@ = mount + console = all, !skipped, !terminate, !restored +# +# WARNING! the following will create a file that you must cycle from +# time to time as it will grow indefinitely. However, it will +# also keep all your messages if the scroll off the console. +# + append = "@working_dir@/log" = all, !skipped + catalog = all, !skipped +} diff --git a/regress/tests/virtualfull-extreme-concurrency-bug-test b/regress/tests/virtualfull-extreme-concurrency-bug-test new file mode 100755 index 0000000000..756f4496d5 --- /dev/null +++ b/regress/tests/virtualfull-extreme-concurrency-bug-test @@ -0,0 +1,258 @@ +#!/bin/sh +# +# Test for a bug that causes massively parallel virtual full jobs to +# deadlock. First create a lot of backups, then run +# virtual fulls on them. +# +TestName="virtualfull-extreme-concurrency-bug-test" +. scripts/functions + +# Setup conf files +scripts/cleanup +scripts/copy-test-confs +cp scripts/virtualfull-extreme-bacula-dir.conf bin/bacula-dir.conf +cp scripts/migrate-bacula-sd.conf bin/bacula-sd.conf + +# we have 20 distinct jobs. Each of those is run once at full level, +# then four times incremental, each time adding data so we end up with +# many used volumes. +# We should have jobs where several virtual fulls compete for volumes. + + +# Backup Bacula stored+objects directory +# Backup director +rm -rf ${tmpsrc} +mkdir ${tmpsrc} +echo "${tmpsrc}" >${tmp}/file-list +for i in `ls ${src}/src/stored/*` ; do + cp -p $i ${tmpsrc} +done +# Get path to temp source files to restore + +start_test + +cat <${cwd}/tmp/bconcmds +@output /dev/null +messages +@$out ${cwd}/tmp/log1.out +@# No prelabeled volumes needed since they are automatically created +@#label storage=File slot=0 drive=0 Pool=Hot1 volume=Vol1 +@#list volumes +END_OF_DATA + +# Start Bacula and do label +run_bacula + +cat <${cwd}/tmp/bconcmds +@output /dev/null +messages +@$out ${cwd}/tmp/log0.out +run job=HotV01 level=Full yes +run job=HotV02 level=Full yes +run job=HotV03 level=Full yes +run job=HotV04 level=Full yes +run job=HotV05 level=Full yes +run job=HotV06 level=Full yes +run job=HotV07 level=Full yes +run job=HotV08 level=Full yes +run job=HotV09 level=Full yes +run job=HotV10 level=Full yes +run job=HotV11 level=Full yes +run job=HotV12 level=Full yes +run job=HotV13 level=Full yes +run job=HotV14 level=Full yes +run job=HotV15 level=Full yes +run job=HotV16 level=Full yes +run job=HotV17 level=Full yes +run job=HotV18 level=Full yes +run job=HotV19 level=Full yes +run job=HotV20 level=Full yes +wait +list volumes +messages +END_OF_DATA + +run_bconsole + +cat <${cwd}/tmp/bconcmds +@output /dev/null +messages +END_OF_DATA + +# add more files to backup source, so following incrementals +# have something to back up +for a in wx-console filed lib tools ; do + #echo ">>> adding ${a} to backup" + for i in `ls ${src}/src/${a}/*` ; do + cp -p "$i" ${tmpsrc} >/dev/null 2>&1 + done + #echo "now $(ls ${tmpsrc}|wc -l) files to back up" + + cat <${cwd}/tmp/bconcmds +@$out ${cwd}/tmp/log1.out a +time +run job=HotV01 level=Incremental yes +run job=HotV02 level=Incremental yes +run job=HotV03 level=Incremental yes +run job=HotV04 level=Incremental yes +run job=HotV05 level=Incremental yes +run job=HotV06 level=Incremental yes +run job=HotV07 level=Incremental yes +run job=HotV08 level=Incremental yes +run job=HotV09 level=Incremental yes +run job=HotV10 level=Incremental yes +run job=HotV11 level=Incremental yes +run job=HotV12 level=Incremental yes +run job=HotV13 level=Incremental yes +run job=HotV14 level=Incremental yes +run job=HotV15 level=Incremental yes +run job=HotV16 level=Incremental yes +run job=HotV17 level=Incremental yes +run job=HotV18 level=Incremental yes +run job=HotV19 level=Incremental yes +run job=HotV20 level=Incremental yes +wait +list volumes +messages +END_OF_DATA +# Run Backup Jobs + run_bconsole +done + +# now do the final virtual full levels. +#echo ">>>> Now the 1st VFull" + +cat <${cwd}/tmp/bconcmds +@output /dev/null +messages +@$out ${cwd}/tmp/log1.out a +@#setdebug level=100 storage +run job=HotV01 level=VirtualFull yes +run job=HotV02 level=VirtualFull yes +run job=HotV03 level=VirtualFull yes +run job=HotV04 level=VirtualFull yes +run job=HotV05 level=VirtualFull yes +run job=HotV06 level=VirtualFull yes +run job=HotV07 level=VirtualFull yes +run job=HotV08 level=VirtualFull yes +run job=HotV09 level=VirtualFull yes +run job=HotV10 level=VirtualFull yes +run job=HotV11 level=VirtualFull yes +run job=HotV12 level=VirtualFull yes +run job=HotV13 level=VirtualFull yes +run job=HotV14 level=VirtualFull yes +run job=HotV15 level=VirtualFull yes +run job=HotV16 level=VirtualFull yes +run job=HotV17 level=VirtualFull yes +run job=HotV18 level=VirtualFull yes +run job=HotV19 level=VirtualFull yes +run job=HotV20 level=VirtualFull yes +wait +sql +select pool.name as poolname,volumename,volstatus,volbytes,voljobs,lastwritten from Pool,Media where Pool.PoolId=Media.MediaId order by poolname,volumename; + +list jobs +messages +END_OF_DATA + +# Run Virtual Full Jobs +run_bconsole + +# add more files to backup source, so following incrementals +# have something to back up +for a in `seq 1 12` ; do + #echo ">>> adding files to backup: ${a}" + for b in `seq 1 150` ; do + date > "${tmpsrc}/run${a}-${b}.data" + done + #echo "now $(ls ${tmpsrc}|wc -l) files to back up" + + cat <${cwd}/tmp/bconcmds +@$out ${cwd}/tmp/log1.out a +time +run job=HotV01 level=Incremental yes +run job=HotV02 level=Incremental yes +run job=HotV03 level=Incremental yes +run job=HotV04 level=Incremental yes +run job=HotV05 level=Incremental yes +run job=HotV06 level=Incremental yes +run job=HotV07 level=Incremental yes +run job=HotV08 level=Incremental yes +run job=HotV09 level=Incremental yes +run job=HotV10 level=Incremental yes +run job=HotV11 level=Incremental yes +run job=HotV12 level=Incremental yes +run job=HotV13 level=Incremental yes +run job=HotV14 level=Incremental yes +run job=HotV15 level=Incremental yes +run job=HotV16 level=Incremental yes +run job=HotV17 level=Incremental yes +run job=HotV18 level=Incremental yes +run job=HotV19 level=Incremental yes +run job=HotV20 level=Incremental yes +wait +list volumes +messages +END_OF_DATA +# Run Backup Jobs + run_bconsole +done + +# restore file list +ls ${tmpsrc}/* >${tmp}/restore-list + +# now do the final virtual full levels. +#echo ">>>> Now the 2nd VFull" + +cat <${cwd}/tmp/bconcmds +@output /dev/null +messages +@$out ${cwd}/tmp/log1.out a +@#setdebug level=100 storage +run job=HotV01 level=VirtualFull yes +run job=HotV02 level=VirtualFull yes +run job=HotV03 level=VirtualFull yes +run job=HotV04 level=VirtualFull yes +run job=HotV05 level=VirtualFull yes +run job=HotV06 level=VirtualFull yes +run job=HotV07 level=VirtualFull yes +run job=HotV08 level=VirtualFull yes +run job=HotV09 level=VirtualFull yes +run job=HotV10 level=VirtualFull yes +run job=HotV11 level=VirtualFull yes +run job=HotV12 level=VirtualFull yes +run job=HotV13 level=VirtualFull yes +run job=HotV14 level=VirtualFull yes +run job=HotV15 level=VirtualFull yes +run job=HotV16 level=VirtualFull yes +run job=HotV17 level=VirtualFull yes +run job=HotV18 level=VirtualFull yes +run job=HotV19 level=VirtualFull yes +run job=HotV20 level=VirtualFull yes +wait +sql +select pool.name as poolname,volumename,volstatus,volbytes,voljobs,lastwritten from Pool,Media where Pool.PoolId=Media.MediaId order by poolname,volumename; + +list jobs +messages +END_OF_DATA + +# Run Virtual Full Jobs +run_bconsole +cat <${cwd}/tmp/bconcmds +@output /dev/null +messages +@$out ${cwd}/tmp/log2.out +restore client=HotV20-fd where=$tmp/bacula-restores select all done yes +wait +messages +END_OF_DATA + +# Do restore +run_bconsole +sleep 2 +stop_bacula + +check_two_logs +check_restore_tmp_build_diff +end_test