sed 's/Migrate/Copy/g' ${cwd}/tmp/1 > ${cwd}/bin/bacula-dir.conf
change_jobname NightlySave $JobName
+if bin/true ; then
+ # add a dummy client for the copy-job to test for bug #9116
+ $bperl -e "add_attribute('$conf/bacula-dir.conf', 'Client', 'dummy-fd', 'Job', 'copy-job')"
+ cat >> $conf/bacula-dir.conf <<EOF
+Client {
+ Name = dummy-fd
+ Address = 8.8.8.8
+ FDPort = 8102
+ FdStorageAddress = 8.8.8.8
+ Catalog = MyCatalog
+ Password = "xevrjURYoCHhn26RaJoWbeWXEY/a3VqGKp/37tgWiuHc" # password for FileDaemon
+ File Retention = 30d # 30 days
+ Job Retention = 180d # six months
+ AutoPrune = yes # Prune expired Jobs/Files
+ Maximum Concurrent Jobs = 4
+}
+
+EOF
+fi
+
SPOOLDATA_JOB=${SPOOLDATA_JOB:-default}
if [ "$SPOOLDATA_JOB" = "yes" ] ; then
$bperl -e "add_attribute('$conf/bacula-dir.conf', 'SpoolData', 'yes', 'Job', 'copy-job')"
@#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
+restore client=$CLIENT where=${cwd}/tmp/bacula-restores select
unmark *
mark *
done
END_OF_DATA
run_bacula
-check_for_zombie_jobs storage=File
+check_for_zombie_jobs storage=File client=${CLIENT}
stop_bacula
check_two_logs