tests: $(COMMONPLUGINTESTS)
-$(UNITTESTSOBJ):
- $(MAKE) -C $(LIBDIR) unittests.lo
-
-$(LIBBACOBJ):
- $(MAKE) -C $(LIBDIR) libbac.la
-
$(LIBBACCFGOBJ):
$(MAKE) -C $(LIBDIR) libbaccfg.la
"regress_metadata_support",
"regress_standard_error_backup",
"regress_cancel_backup",
+ "regress_cancel_restore",
NULL,
};
#endif
bool regress_metadata_support = false;
bool regress_standard_error_backup = false;
bool regress_cancel_backup = false;
+bool regress_cancel_restore = false;
#define BUFLEN 4096
static void catch_function(int signo)
{
- LOG("#CANCELLED#");
+ if (regress_cancel_backup) {
+ LOG("#CANCELLED BACKUP#");
+ } else
+ if (regress_cancel_restore) {
+ LOG("#CANCELLED RESTORE#");
+ } else {
+ LOG("#CANCELLED UNKNOWN#");
+ }
jobcancelled = true;
}
if (regress_cancel_backup)
{
LOG("#Cancel wait started...");
+ snprintf(buf, BIGBUFLEN, "#Cancel PID: %d", getpid());
+ write_plugin('I', buf);
while (!jobcancelled)
sleep(1);
LOG("#Cancel event received, EXIT");
// "regress_error_backup_abort",
// "regress_standard_error_backup",
// "regress_cancel_backup",
+ // "regress_cancel_restore",
if (strcmp(buf, "regress_error_plugin_params=1\n") == 0) {
regress_error_plugin_params = true;
}
if (strcmp(buf, "regress_cancel_backup=1\n") == 0) {
regress_cancel_backup = true;
- if (signal(SIGUSR1, catch_function) == SIG_ERR){
- LOG("Cannot setup signal handler!");
- exit(EXIT_BACKEND_SIGNAL_HANDLER_ERROR);
- }
+ continue;
+ }
+ if (strcmp(buf, "regress_cancel_restore=1\n") == 0) {
+ regress_cancel_restore = true;
continue;
}
if (sscanf(buf, "listing=%s\n", buf) == 1){
continue;
}
}
+ if (regress_cancel_restore || regress_cancel_backup) {
+ if (signal(SIGUSR1, catch_function) == SIG_ERR){
+ LOG("Cannot setup signal handler!");
+ exit(EXIT_BACKEND_SIGNAL_HANDLER_ERROR);
+ }
+ }
write_plugin('I', "TEST3");
if (!regress_error_plugin_params){
signal_eod();
c
diff
1
+.vscode
*.out
backup-mysql-7.0.sql
backup-postgres-5.2.sql
bin-5.2.0/
bin-7.0/
do_database_ugrade
-
scripts/bacula-dir.conf.accurate
scripts/bacula-dir.conf.errors
scripts/bacula-dir.conf.maxruntime
}
}
+Job {
+ Name = "PluginK8STestProtocol7"
+ JobDefs = "BackupJob"
+ FileSet="TestPluginK8SSetProtocol7"
+}
+
+FileSet {
+ Name = "TestPluginK8SSetProtocol7"
+ Include {
+ Options { signature=MD5 }
+ Plugin = "kubernetes: regress_cancel_backup"
+ }
+}
+
FileSet {
Name = "TestPluginKubernetesSet"
Include { Options { signature=SHA1 }
#
# It is expected to use this test just after a proper regression setup, i.e.
#
-# TestName="rhv-plugin-protocol-test"
-# JobBackup1="PluginRHEVTestProtocol1"
-# FilesetBackup1="TestPluginRHEVSetProtocol1"
-# JobBackup2="PluginRHEVTestProtocol2"
-# JobBackup3="PluginRHEVTestProtocol3"
-# JobBackup4="PluginRHEVTestProtocol4"
-# Plugin="rhv:"
-# . scripts/functions
-# scripts/cleanup
-# scripts/copy-rhv-plugin-confs
-# make -C $src/src/plugins/fd/rhv/src install-test-plugin
-# . scripts/metaplugin-protocol-tests.sh
+# TestName="kubernetes-plugin-protocol-test"
+# JobBackup1="PluginK8STestProtocol1"
+# FilesetBackup1="TestPluginK8SSetProtocol1"
+# FilesetBackup5="TestPluginK8SSetProtocol5"
+# JobBackup2="PluginK8STestProtocol2"
+# JobBackup3="PluginK8STestProtocol3"
+# JobBackup4="PluginK8STestProtocol4"
+# JobBackup5="PluginK8STestProtocol5"
+# JobBackup6="PluginK8STestProtocol6"
+# JobBackup7="PluginK8STestProtocol7"
+# Plugin="kubernetes:"
+# . scripts/functions
+# scripts/cleanup
+# scripts/copy-kubernetes-plugin-confs
+# make -C ${src}/src/plugins/fd/kubernetes install-test-plugin
+# . scripts/metaplugin-protocol-tests.sh
#
-if [ "x$JobBackup1" = "x" ] || [ "x$JobBackup2" = "x" ] || [ "x$JobBackup3" = "x" ] || [ "x$JobBackup4" = "x" ] || [ "x$JobBackup5" = "x" ] || [ "x$JobBackup6" = "x" ] || [ "x$FilesetBackup1" = "x" ]
+if [ "x$JobBackup1" = "x" ] || [ "x$JobBackup2" = "x" ] || [ "x$JobBackup3" = "x" ] || [ "x$JobBackup4" = "x" ] || [ "x$JobBackup5" = "x" ] || [ "x$JobBackup6" = "x" ] || [ "x$JobBackup7" = "x" ] \
+ || [ "x$FilesetBackup1" = "x" ] || [ "x$FilesetBackup5" = "x" ]
then
echo "You have to setup required variables!"
exit 2
run_bconsole
+# now cancel a backup job
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
+@#
+@# Backup and cancel event
+@#
+@output /dev/null
+messages
+@$out ${cwd}/tmp/log9.out
+status client=$CLIENT
+setdebug level=500 client=$CLIENT trace=1
+run job=$JobBackup7 yes
+@sleep 10
+status client=$CLIENT
+messages
+cancel all yes
+wait
+status client=$CLIENT
+messages
+llist job=$JobBackup7
+@output
+quit
+END_OF_DATA
+
+run_bconsole
+
# now test estimate job
cat <<END_OF_DATA >${cwd}/tmp/bconcmds
bstat=$((bstat+64))
fi
+RET=$(grep "jobstatus:" ${cwd}/tmp/log9.out | awk '{print $2}')
+PID=$(grep -w "#Cancel PID:" ${cwd}/tmp/log9.out | awk '{print $9}')
+CANCELLED=$(grep -c -w "#CANCELLED BACKUP#" ${cwd}/working/*${PID}.log)
+if [ "x$RET" != "xA" ] || [ "$CANCELLED" -ne 1 ]
+then
+ echo "log9" "$RET" "$CANCELLED"
+ bstat=$((bstat+128))
+fi
+
MINFO=$(grep -c M_INFO ${cwd}/tmp/log8.out)
MWARNING=$(grep -c M_WARNING ${cwd}/tmp/log8.out)
-MSAVED=$(grep -c M_SAVED ${cwd}/tmp/log8.out)
+# MSAVED=$(grep -c M_SAVED ${cwd}/tmp/log8.out)
MNOTSAVED=$(grep -c M_NOTSAVED ${cwd}/tmp/log8.out)
if [ "$MINFO" -ne 1 ] || [ "$MWARNING" -ne 1 ] || [ "$MNOTSAVED" -ne 1 ]
then
echo "log8msg" "$MINFO" "$MWARNING" "$MNOTSAVED"
- bstat=$((bstat+128))
+ bstat=$((bstat+256))
fi
EFILE1=$(grep -c vm1.iso ${cwd}/tmp/log3.out)
--- /dev/null
+#
+# Kubernetes Plugin Bacula Director Configuration file
+#
+
+Director { # define myself
+ Name = @hostname@-dir
+ DIRPort = @dirport@ # where we listen for UA connections
+ QueryFile = "@scriptdir@/query.sql"
+ WorkingDirectory = "@working_dir@"
+ PidDirectory = "@piddir@"
+ SubSysDirectory = "@subsysdir@"
+ Maximum Concurrent Jobs = 1
+ Password = "pNvX1WiXnwv2C/F7E52LGvw6rKjbbPvu2kyuPa9pVaL3" # Console password
+ Messages = Standard
+}
+
+JobDefs {
+ Name = "BackupJob"
+ Type = Backup
+ Pool = Default
+ Storage = File
+ Messages = Standard
+ Priority = 10
+ Client=@hostname@-fd
+ Write Bootstrap = "@working_dir@/%n-%f.bsr"
+}
+
+JobDefs {
+ Name = "Default"
+ Type = Backup
+ Client=@hostname@-fd
+ Level = Full
+ Storage = File1
+ Messages = Standard
+ Write Bootstrap = "@working_dir@/%c.bsr"
+ Pool = Default
+ SpoolData = yes
+ Max Run Time = 30min
+}
+
+Job {
+ Name = "PluginK8STestProtocol1"
+ JobDefs = "BackupJob"
+ FileSet="TestPluginK8SSetProtocol1"
+}
+
+FileSet {
+ Name = "TestPluginK8SSetProtocol1"
+ Include {
+ Options { signature=MD5 }
+ Plugin = "openshift:"
+ }
+}
+
+Job {
+ Name = "PluginK8STestProtocol2"
+ JobDefs = "BackupJob"
+ FileSet="TestPluginK8SSetProtocol2"
+}
+
+FileSet {
+ Name = "TestPluginK8SSetProtocol2"
+ Include {
+ Options { signature=MD5 }
+ Plugin = "openshift: regress_backup_plugin_objects"
+ }
+}
+
+Job {
+ Name = "PluginK8STestProtocol3"
+ JobDefs = "BackupJob"
+ FileSet="TestPluginK8SSetProtocol3"
+}
+
+FileSet {
+ Name = "TestPluginK8SSetProtocol3"
+ Include {
+ Options { signature=MD5 }
+ Plugin = "openshift:"
+ Plugin = "openshift: regress_backup_other_file"
+ }
+}
+
+Job {
+ Name = "PluginK8STestProtocol4"
+ JobDefs = "BackupJob"
+ FileSet="TestPluginK8SSetProtocol4"
+}
+
+FileSet {
+ Name = "TestPluginK8SSetProtocol4"
+ Include {
+ Options { signature=MD5 }
+ Plugin = "openshift: regress_error_backup_stderr"
+ }
+}
+
+Job {
+ Name = "PluginK8STestProtocol5"
+ JobDefs = "BackupJob"
+ FileSet="TestPluginK8SSetProtocol5"
+}
+
+FileSet {
+ Name = "TestPluginK8SSetProtocol5"
+ Include {
+ Options { signature=MD5 }
+ Plugin = "openshift: regress_metadata_support"
+ }
+}
+
+Job {
+ Name = "PluginK8STestProtocol6"
+ JobDefs = "BackupJob"
+ FileSet="TestPluginK8SSetProtocol6"
+}
+
+FileSet {
+ Name = "TestPluginK8SSetProtocol6"
+ Include {
+ Options { signature=MD5 }
+ Plugin = "openshift: regress_standard_error_backup"
+ }
+}
+
+Job {
+ Name = "PluginK8STestProtocol7"
+ JobDefs = "BackupJob"
+ FileSet="TestPluginK8SSetProtocol7"
+}
+
+FileSet {
+ Name = "TestPluginK8SSetProtocol7"
+ Include {
+ Options { signature=MD5 }
+ Plugin = "openshift: regress_cancel_backup"
+ }
+}
+
+FileSet {
+ Name = "TestPluginKubernetesSet"
+ Include { Options { signature=SHA1 }
+ Plugin = "@LPLUG@"
+ }
+}
+Job {
+ Name = "PluginKubernetesTest"
+ JobDefs = Default
+ FileSet = TestPluginKubernetesSet
+}
+
+FileSet {
+ Name = "TestPluginKubernetesSet1"
+ Include { Options { signature=SHA1 }
+ Plugin = "@LPLUG@ namespace=plugintest"
+ }
+}
+Job {
+ Name = "PluginKubernetesTest1"
+ JobDefs = Default
+ FileSet = TestPluginKubernetesSet1
+}
+
+FileSet {
+ Name = "TestPluginKubernetesSet2"
+ Include { Options { signature=SHA1 }
+ Plugin = "@LPLUG@ persistentvolume=@PV1@"
+ }
+}
+Job {
+ Name = "PluginKubernetesTest2"
+ JobDefs = Default
+ FileSet = TestPluginKubernetesSet2
+}
+
+FileSet {
+ Name = "TestPluginKubernetesSet3"
+ Include { Options { signature=SHA1 }
+ Plugin = "@LPLUG@ namespace=plugintest persistentvolume=@PV1@"
+ }
+}
+Job {
+ Name = "PluginKubernetesTest3"
+ JobDefs = Default
+ FileSet = TestPluginKubernetesSet3
+}
+
+FileSet {
+ Name = "TestPluginKubernetesSet11"
+ Include { Options { signature=SHA1 }
+ Plugin = "@LPLUG@ namespace=nonexistent"
+ }
+}
+Job {
+ Name = "PluginKubernetesTest11"
+ JobDefs = Default
+ FileSet = TestPluginKubernetesSet11
+}
+
+FileSet {
+ Name = "TestPluginKubernetesSet12"
+ Include { Options { signature=SHA1 }
+ Plugin = "@LPLUG@ persistentvolume=nonexistent"
+ }
+}
+Job {
+ Name = "PluginKubernetesTest12"
+ JobDefs = Default
+ FileSet = TestPluginKubernetesSet12
+}
+
+FileSet {
+ Name = "TestPluginKubernetesSet13"
+ Include { Options { signature=SHA1 }
+ Plugin = "@LPLUG@ persistentvolume=@PV1@ invalidoption"
+ }
+}
+Job {
+ Name = "PluginKubernetesTest13"
+ JobDefs = Default
+ FileSet = TestPluginKubernetesSet13
+}
+
+FileSet {
+ Name = "TestPluginKubernetesSet21"
+ Include { Options { signature=SHA1 }
+ Plugin = "@LPLUG@ namespace=nonexistent abort_on_error"
+ }
+}
+Job {
+ Name = "PluginKubernetesTest21"
+ JobDefs = Default
+ FileSet = TestPluginKubernetesSet21
+}
+
+FileSet {
+ Name = "TestPluginKubernetesSet22"
+ Include { Options { signature=SHA1 }
+ Plugin = "@LPLUG@ persistentvolume=nonexistent abort_on_error"
+ }
+}
+Job {
+ Name = "PluginKubernetesTest22"
+ JobDefs = Default
+ FileSet = TestPluginKubernetesSet22
+}
+
+
+# List of files to be backed up
+FileSet {
+ Name = "Full Set"
+ Include { Options { signature=SHA1 }
+ File =<@tmpdir@/file-list
+ }
+}
+
+# Client (File Services) to backup
+Client {
+ Name = @hostname@-fd
+ Address = @hostname@
+ FDPort = @fdport@
+ 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
+}
+
+# Definiton of file storage device
+Storage {
+ Name = File
+ Address = @hostname@ # N.B. Use a fully qualified name here
+ SDPort = @sdport@
+ Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
+ Device = FileStorage
+ Media Type = File
+}
+
+# Definiton of file storage device
+Storage {
+ Name = File1
+ Address = @hostname@ # N.B. Use a fully qualified name here
+ SDPort = @sdport@
+ Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
+ Device = FileStorage
+ Media Type = File1
+}
+
+# Standard Restore template, to be changed by Console program
+Job {
+ Name = "RestoreFiles"
+ Type = Restore
+ Client=@hostname@-fd
+ FileSet="Full Set"
+ Storage = File1
+ Messages = Standard
+ Pool = Default
+ Where = @tmpdir@/bacula-restores
+ Max Run Time = 30min
+}
+
+# Generic catalog service
+Catalog {
+ Name = MyCatalog
+ @libdbi@
+ 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, !terminate
+# operator = @job_email@ = mount
+ console = all
+
+ append = "@working_dir@/log" = all, !skipped
+ catalog = all, !skipped
+}
+
+Messages {
+ Name = NoEmail
+ mailcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula regression\) %r\" -s \"Regression: %t %e of %c %l\" %r"
+ console = all, !skipped, !terminate, !restored
+ append = "@working_dir@/log" = all, !skipped
+ catalog = all, !skipped
+}
+
+
+# Default pool definition
+Pool {
+ Name = Default
+ Pool Type = Backup
+ Recycle = yes # Bacula can automatically recycle Volumes
+ AutoPrune = yes # Prune expired volumes
+ Volume Retention = 365d # one year
+}
--- /dev/null
+#
+# Default Bacula Director Configuration file
+#
+# The only thing that MUST be changed is to add one or more
+# file or directory names in the Include directive of the
+# FileSet resource.
+#
+# For Bacula release 1.39 or later
+#
+# You might also want to change the default email address
+# from root to your address. See the "mail" and "operator"
+# directives in the Messages resource.
+#
+
+Director { # define myself
+ Name = @hostname@-dir
+ DIRPort = @dirport@ # where we listen for UA connections
+ QueryFile = "@scriptdir@/query.sql"
+ WorkingDirectory = "@working_dir@"
+ PidDirectory = "@piddir@"
+ SubSysDirectory = "@subsysdir@"
+ PluginDirectory = "@sbindir@/plugins"
+ Maximum Concurrent Jobs = 4
+ Password = "pNvX1WiXnwv2C/F7E52LGvw6rKjbbPvu2kyuPa9pVaL3" # Console password
+ Messages = Standard
+}
+
+Job {
+ Name = "PluginRHEVTest"
+ JobDefs = "BackupJob"
+ FileSet="TestPluginRHEVSet"
+}
+
+JobDefs {
+ Name = "BackupJob"
+ Type = Backup
+ Pool = Default
+ Storage = File
+ Messages = Standard
+ Priority = 10
+ Client=@hostname@-fd
+ Write Bootstrap = "@working_dir@/%n-%f.bsr"
+}
+
+# Standard Restore template, to be changed by Console program
+Job {
+ Name = "RestoreFiles"
+ Type = Restore
+ Client=@hostname@-fd
+ FileSet="Full Set"
+ Storage = File
+ Messages = Standard
+ Pool = Default
+ Where = @tmpdir@/bacula-restores
+}
+
+
+# List of files to be backed up
+FileSet {
+ Name = "Full Set"
+ Include {
+ Options { signature=MD5; sparse=yes }
+ File = /tmp
+ }
+}
+
+FileSet {
+ Name = "TestPluginRHEVSet"
+ Include {
+ Options {
+ signature=MD5
+ }
+ Plugin = "rhv: User=test:tester Password=testing server=http://127.0.0.1:8080/auth/v1.0 abort_on_error vm_name=container1"
+ Plugin = "rhv: User=eric:isthebest Password=hello server=http://127.0.0.1:8080/auth/v1.0 abort_on_error vm_name=container2"
+ }
+}
+
+Job {
+ Name = "PluginRHEVTestProtocol1"
+ JobDefs = "BackupJob"
+ FileSet="TestPluginRHEVSetProtocol1"
+}
+
+FileSet {
+ Name = "TestPluginRHEVSetProtocol1"
+ Include {
+ Options { signature=MD5 }
+ Plugin = "rhv:"
+ }
+}
+
+Job {
+ Name = "PluginRHEVTestProtocol2"
+ JobDefs = "BackupJob"
+ FileSet="TestPluginRHEVSetProtocol2"
+}
+
+FileSet {
+ Name = "TestPluginRHEVSetProtocol2"
+ Include {
+ Options { signature=MD5 }
+ Plugin = "rhv: regress_backup_plugin_objects"
+ }
+}
+
+Job {
+ Name = "PluginRHEVTestProtocol3"
+ JobDefs = "BackupJob"
+ FileSet="TestPluginRHEVSetProtocol3"
+}
+
+FileSet {
+ Name = "TestPluginRHEVSetProtocol3"
+ Include {
+ Options { signature=MD5 }
+ Plugin = "rhv:"
+ Plugin = "rhv: regress_backup_other_file"
+ }
+}
+
+Job {
+ Name = "PluginRHEVTestProtocol4"
+ JobDefs = "BackupJob"
+ FileSet="TestPluginRHEVSetProtocol4"
+}
+
+FileSet {
+ Name = "TestPluginRHEVSetProtocol4"
+ Include {
+ Options { signature=MD5 }
+ Plugin = "rhv: regress_error_backup_stderr"
+ }
+}
+
+Job {
+ Name = "PluginRHEVTestProtocol5"
+ JobDefs = "BackupJob"
+ FileSet="TestPluginRHEVSetProtocol5"
+}
+
+FileSet {
+ Name = "TestPluginRHEVSetProtocol5"
+ Include {
+ Options { signature=MD5 }
+ Plugin = "rhv: regress_metadata_support"
+ }
+}
+
+Job {
+ Name = "PluginRHEVTestProtocol6"
+ JobDefs = "BackupJob"
+ FileSet="TestPluginRHEVSetProtocol6"
+}
+
+FileSet {
+ Name = "TestPluginRHEVSetProtocol6"
+ Include {
+ Options { signature=MD5 }
+ Plugin = "rhv: regress_standard_error_backup"
+ }
+}
+
+Job {
+ Name = "PluginRHEVTestProtocol7"
+ JobDefs = "BackupJob"
+ FileSet="TestPluginRHEVSetProtocol7"
+}
+
+FileSet {
+ Name = "TestPluginRHEVSetProtocol7"
+ Include {
+ Options { signature=MD5 }
+ Plugin = "rhv: regress_cancel_backup"
+ }
+}
+
+Job {
+ Name = "PluginRHEVTest1"
+ JobDefs = "BackupJob"
+ FileSet="TestPluginRHEVSet1"
+}
+
+FileSet {
+ Name = "TestPluginRHEVSet1"
+ Include {
+ Options {
+ signature=MD5
+ compression=GZIP9
+ }
+ Plugin = "rhv: user=@st_user@ password=@st_key@ server=@st_auth@ output debug"
+ }
+}
+
+Job {
+ Name = "PluginRHEVTest2"
+ JobDefs = "BackupJob"
+ FileSet="TestPluginRHEVSet2"
+}
+
+FileSet {
+ Name = "TestPluginRHEVSet2"
+ Include {
+ Options {
+ signature=MD5
+ compression=GZIP9
+ }
+ Plugin = "rhv: user=@st_user@ password=@st_key@ server=@st_auth@ include=container1/* output debug"
+ }
+}
+
+Job {
+ Name = "PluginRHEVTest3"
+ JobDefs = "BackupJob"
+ FileSet="TestPluginRHEVSet3"
+}
+
+FileSet {
+ Name = "TestPluginRHEVSet3"
+ Include {
+ Options {
+ signature=MD5
+ compression=GZIP9
+ }
+ Plugin = "rhv: user=@st_user@ password=@st_key@ server=@st_auth@ include=container2/bin/bash output debug"
+ }
+}
+
+Job {
+ Name = "PluginRHEVTest4"
+ JobDefs = "BackupJob"
+ FileSet="TestPluginRHEVSet4"
+}
+
+FileSet {
+ Name = "TestPluginRHEVSet4"
+ Include {
+ Options {
+ signature=MD5
+ compression=GZIP9
+ }
+ Plugin = "rhv: user=@st_user@ password=@st_key@ server=@st_auth@ exclude=container2/* output debug"
+ }
+}
+
+Job {
+ Name = "PluginRHEVTest5"
+ JobDefs = "BackupJob"
+ FileSet="TestPluginRHEVSet5"
+}
+
+FileSet {
+ Name = "TestPluginRHEVSet5"
+ Include {
+ Options {
+ signature=MD5
+ compression=GZIP9
+ }
+ Plugin = "rhv: user=@st_user@ password=@st_key@ server=@st_auth@ vm_name=container1 vm_name=container1 output debug"
+ }
+}
+
+Job {
+ Name = "PluginRHEVTest6"
+ JobDefs = "BackupJob"
+ FileSet="TestPluginRHEVSet6"
+}
+
+FileSet {
+ Name = "TestPluginRHEVSet6"
+ Include {
+ Options {
+ signature=MD5
+ compression=GZIP9
+ }
+ Plugin = "rhv: user=@st_user@ password=@st_key@ server=@st_auth@ vm_name=container1 output debug"
+ Plugin = "rhv: user=@st_user@ password=@st_key@ server=@st_auth@ vm_name=container3 output debug"
+ }
+}
+
+Job {
+ Name = "PluginRHEVTest7"
+ JobDefs = "BackupJob"
+ FileSet="TestPluginRHEVSet7"
+}
+
+FileSet {
+ Name = "TestPluginRHEVSet7"
+ Include {
+ Options {
+ signature=MD5
+ compression=GZIP9
+ }
+ Plugin = "rhv: user=@st_user@ password=@st_key@ server=@st_auth@ vm_name=container2 output debug"
+ }
+}
+
+Job {
+ Name = "PluginRHEVTest8"
+ JobDefs = "BackupJob"
+ FileSet="TestPluginRHEVSet8"
+}
+
+FileSet {
+ Name = "TestPluginRHEVSet8"
+ Include {
+ Options {
+ signature=MD5
+ compression=GZIP9
+ }
+ Plugin = "rhv: user=@st_user@ password=@st_key@ server=@st_auth@ vm_name=container1 output debug"
+ Plugin = "rhv: user=@st_user@ password=@st_key@ server=@st_auth@ vm_name=container2 output debug"
+ }
+}
+
+Job {
+ Name = "PluginRHEVTest9"
+ JobDefs = "BackupJob"
+ FileSet="TestPluginRHEVSet9"
+}
+
+FileSet {
+ Name = "TestPluginRHEVSet9"
+ Include {
+ Options {
+ signature=MD5
+ compression=GZIP9
+ }
+ Plugin = "rhv: user=@st_user@ password=@st_key@ server=@st_auth@ vm_name=container11 output debug"
+ }
+}
+
+Job {
+ Name = "PluginRHEVTest10"
+ JobDefs = "BackupJob"
+ FileSet="TestPluginRHEVSet10"
+}
+
+FileSet {
+ Name = "TestPluginRHEVSet10"
+ Include {
+ Options {
+ signature=MD5
+ compression=GZIP9
+ }
+ Plugin = "rhv: user=@st_user@ password=@st_key@ server=@st_auth@ vm_name=container1 output debug"
+ }
+}
+
+Job {
+ Name = "PluginRHEVTest11"
+ JobDefs = "BackupJob"
+ FileSet="TestPluginRHEVSet11"
+}
+
+FileSet {
+ Name = "TestPluginRHEVSet11"
+ Include {
+ Options {
+ signature=MD5
+ compression=GZIP9
+ }
+ Plugin = "rhv: user=@st_user@ password=@st_key@ server=@st_auth@ exclude=container11 output debug"
+ }
+}
+
+Job {
+ Name = "PluginRHEVTest12"
+ JobDefs = "BackupJob"
+ FileSet="TestPluginRHEVSet12"
+}
+
+FileSet {
+ Name = "TestPluginRHEVSet12"
+ Include {
+ Options {
+ signature=MD5
+ compression=GZIP9
+ }
+ Plugin = "rhv: user=OTHER password=NOTSET server=@st_auth@ debug output abort_on_error"
+ }
+}
+
+Job {
+ Name = "PluginRHEVTest13"
+ JobDefs = "BackupJob"
+ FileSet="TestPluginRHEVSet13"
+}
+
+FileSet {
+ Name = "TestPluginRHEVSet13"
+ Include {
+ Options {
+ signature=MD5
+ compression=GZIP9
+ }
+ Plugin = "rhv: user=OTHER password=NOTSET server=192.168.0.80 debug abort_on_error"
+ }
+}
+
+Job {
+ Name = "PluginRHEVTest14"
+ JobDefs = "BackupJob"
+ FileSet="TestPluginRHEVSet14"
+}
+
+FileSet {
+ Name = "TestPluginRHEVSet14"
+ Include {
+ Options {
+ signature=MD5
+ compression=GZIP9
+ }
+ Plugin = "rhv: user=@st_user@ server=@st_auth@ debug abort_on_error"
+ }
+}
+
+Job {
+ Name = "PluginRHEVTest15"
+ JobDefs = "BackupJob"
+ FileSet="TestPluginRHEVSet15"
+}
+
+FileSet {
+ Name = "TestPluginRHEVSet15"
+ Include {
+ Options {
+ signature=MD5
+ compression=GZIP9
+ }
+ Plugin = "rhv: user=@st_user@ password=@st_key@ server=@st_auth@ include=container11/* abort_on_error output debug"
+ }
+}
+
+#
+# When to do the backups, full backup on first sunday of the month,
+# differential (i.e. incremental since full) every other sunday,
+# and incremental backups other days
+Schedule {
+ Name = "WeeklyCycle"
+ Run = Level=Full 1st sun at 1:05
+ Run = Level=Differential 2nd-5th sun at 1:05
+ Run = Level=Incremental mon-sat at 1:05
+}
+
+# This schedule does the catalog. It starts after the WeeklyCycle
+Schedule {
+ Name = "WeeklyCycleAfterBackup"
+ Run = Level=Full sun-sat at 1:10
+}
+
+# Client (File Services) to backup
+Client {
+ Name = @hostname@-fd
+ Address = @hostname@
+ FDPort = @fdport@
+ 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
+}
+
+# Definiton of file storage device
+Storage {
+ Name = File
+ Address = @hostname@ # N.B. Use a fully qualified name here
+ SDPort = @sdport@
+ Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
+ Device = FileStorage
+ Media Type = File
+ Maximum Concurrent Jobs = 4
+}
+
+Storage {
+ Name = File1
+ Address = @hostname@ # N.B. Use a fully qualified name here
+ SDPort = @sdport@
+ Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
+ Device = FileStorage1
+ Media Type = File1
+ Maximum Concurrent Jobs = 4
+}
+
+# Generic catalog service
+Catalog {
+ Name = MyCatalog
+ @libdbi@
+ 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, !terminate
+# operator = @job_email@ = mount
+ console = all
+
+ append = "@working_dir@/log" = all, !skipped
+ catalog = all, !skipped
+}
+
+Messages {
+ Name = NoEmail
+ mailcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula regression\) %r\" -s \"Regression: %t %e of %c %l\" %r"
+ console = all, !skipped, !terminate
+#
+# 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
+}
+
+
+# Default pool definition
+Pool {
+ Name = Default
+ Pool Type = Backup
+ Recycle = yes # Bacula can automatically recycle Volumes
+ AutoPrune = yes # Prune expired volumes
+ Volume Retention = 365d # one year
+# Label Format = "TEST-${Year}-${Month:p/2/0/r}-${Day:p/2/0/r}:${NumVols}"
+# Maximum Volume Jobs = 1
+}
--- /dev/null
+#
+# Kubernetes Plugin Bacula Director Configuration file
+#
+
+Director { # define myself
+ Name = @hostname@-dir
+ DIRPort = @dirport@ # where we listen for UA connections
+ QueryFile = "@scriptdir@/query.sql"
+ WorkingDirectory = "@working_dir@"
+ PidDirectory = "@piddir@"
+ SubSysDirectory = "@subsysdir@"
+ Maximum Concurrent Jobs = 1
+ Password = "pNvX1WiXnwv2C/F7E52LGvw6rKjbbPvu2kyuPa9pVaL3" # Console password
+ Messages = Standard
+}
+
+JobDefs {
+ Name = "BackupJob"
+ Type = Backup
+ Pool = Default
+ Storage = File
+ Messages = Standard
+ Priority = 10
+ Client=@hostname@-fd
+ Write Bootstrap = "@working_dir@/%n-%f.bsr"
+}
+
+JobDefs {
+ Name = "Default"
+ Type = Backup
+ Client=@hostname@-fd
+ Level = Full
+ Storage = File1
+ Messages = Standard
+ Write Bootstrap = "@working_dir@/%c.bsr"
+ Pool = Default
+ SpoolData = yes
+ Max Run Time = 30min
+}
+
+Job {
+ Name = "PluginSWIFTTestProtocol1"
+ JobDefs = "BackupJob"
+ FileSet="TestPluginSWIFTSetProtocol1"
+}
+
+FileSet {
+ Name = "TestPluginSWIFTSetProtocol1"
+ Include {
+ Options { signature=MD5 }
+ Plugin = "swift:"
+ }
+}
+
+Job {
+ Name = "PluginSWIFTTestProtocol2"
+ JobDefs = "BackupJob"
+ FileSet="TestPluginSWIFTSetProtocol2"
+}
+
+FileSet {
+ Name = "TestPluginSWIFTSetProtocol2"
+ Include {
+ Options { signature=MD5 }
+ Plugin = "swift: regress_backup_plugin_objects"
+ }
+}
+
+Job {
+ Name = "PluginSWIFTTestProtocol3"
+ JobDefs = "BackupJob"
+ FileSet="TestPluginSWIFTSetProtocol3"
+}
+
+FileSet {
+ Name = "TestPluginSWIFTSetProtocol3"
+ Include {
+ Options { signature=MD5 }
+ Plugin = "swift:"
+ Plugin = "swift: regress_backup_other_file"
+ }
+}
+
+Job {
+ Name = "PluginSWIFTTestProtocol4"
+ JobDefs = "BackupJob"
+ FileSet="TestPluginSWIFTSetProtocol4"
+}
+
+FileSet {
+ Name = "TestPluginSWIFTSetProtocol4"
+ Include {
+ Options { signature=MD5 }
+ Plugin = "swift: regress_error_backup_stderr"
+ }
+}
+
+Job {
+ Name = "PluginSWIFTTestProtocol5"
+ JobDefs = "BackupJob"
+ FileSet="TestPluginSWIFTSetProtocol5"
+}
+
+FileSet {
+ Name = "TestPluginSWIFTSetProtocol5"
+ Include {
+ Options { signature=MD5 }
+ Plugin = "swift: regress_metadata_support"
+ }
+}
+
+Job {
+ Name = "PluginSWIFTTestProtocol6"
+ JobDefs = "BackupJob"
+ FileSet="TestPluginSWIFTSetProtocol6"
+}
+
+FileSet {
+ Name = "TestPluginSWIFTSetProtocol6"
+ Include {
+ Options { signature=MD5 }
+ Plugin = "swift: regress_standard_error_backup"
+ }
+}
+
+Job {
+ Name = "PluginSWIFTTestProtocol7"
+ JobDefs = "BackupJob"
+ FileSet="TestPluginSWIFTSetProtocol7"
+}
+
+FileSet {
+ Name = "TestPluginSWIFTSetProtocol7"
+ Include {
+ Options { signature=MD5 }
+ Plugin = "swift: regress_cancel_backup"
+ }
+}
+
+FileSet {
+ Name = "TestPluginSWIFTSet"
+ Include { Options { signature=SHA1 }
+ Plugin = "@LPLUG@"
+ }
+}
+Job {
+ Name = "PluginSWIFTTest"
+ JobDefs = Default
+ FileSet = TestPluginSWIFTSet
+}
+
+FileSet {
+ Name = "TestPluginSWIFTSet1"
+ Include { Options { signature=SHA1 }
+ Plugin = "@LPLUG@ namespace=plugintest"
+ }
+}
+Job {
+ Name = "PluginSWIFTTest1"
+ JobDefs = Default
+ FileSet = TestPluginSWIFTSet1
+}
+
+FileSet {
+ Name = "TestPluginSWIFTSet2"
+ Include { Options { signature=SHA1 }
+ Plugin = "@LPLUG@ persistentvolume=@PV1@"
+ }
+}
+Job {
+ Name = "PluginSWIFTTest2"
+ JobDefs = Default
+ FileSet = TestPluginSWIFTSet2
+}
+
+FileSet {
+ Name = "TestPluginSWIFTSet3"
+ Include { Options { signature=SHA1 }
+ Plugin = "@LPLUG@ namespace=plugintest persistentvolume=@PV1@"
+ }
+}
+Job {
+ Name = "PluginSWIFTTest3"
+ JobDefs = Default
+ FileSet = TestPluginSWIFTSet3
+}
+
+FileSet {
+ Name = "TestPluginSWIFTSet11"
+ Include { Options { signature=SHA1 }
+ Plugin = "@LPLUG@ namespace=nonexistent"
+ }
+}
+Job {
+ Name = "PluginSWIFTTest11"
+ JobDefs = Default
+ FileSet = TestPluginSWIFTSet11
+}
+
+FileSet {
+ Name = "TestPluginSWIFTSet12"
+ Include { Options { signature=SHA1 }
+ Plugin = "@LPLUG@ persistentvolume=nonexistent"
+ }
+}
+Job {
+ Name = "PluginSWIFTTest12"
+ JobDefs = Default
+ FileSet = TestPluginSWIFTSet12
+}
+
+FileSet {
+ Name = "TestPluginSWIFTSet13"
+ Include { Options { signature=SHA1 }
+ Plugin = "@LPLUG@ persistentvolume=@PV1@ invalidoption"
+ }
+}
+Job {
+ Name = "PluginSWIFTTest13"
+ JobDefs = Default
+ FileSet = TestPluginSWIFTSet13
+}
+
+FileSet {
+ Name = "TestPluginSWIFTSet21"
+ Include { Options { signature=SHA1 }
+ Plugin = "@LPLUG@ namespace=nonexistent abort_on_error"
+ }
+}
+Job {
+ Name = "PluginSWIFTTest21"
+ JobDefs = Default
+ FileSet = TestPluginSWIFTSet21
+}
+
+FileSet {
+ Name = "TestPluginSWIFTSet22"
+ Include { Options { signature=SHA1 }
+ Plugin = "@LPLUG@ persistentvolume=nonexistent abort_on_error"
+ }
+}
+Job {
+ Name = "PluginSWIFTTest22"
+ JobDefs = Default
+ FileSet = TestPluginSWIFTSet22
+}
+
+
+# List of files to be backed up
+FileSet {
+ Name = "Full Set"
+ Include { Options { signature=SHA1 }
+ File =<@tmpdir@/file-list
+ }
+}
+
+# Client (File Services) to backup
+Client {
+ Name = @hostname@-fd
+ Address = @hostname@
+ FDPort = @fdport@
+ 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
+}
+
+# Definiton of file storage device
+Storage {
+ Name = File
+ Address = @hostname@ # N.B. Use a fully qualified name here
+ SDPort = @sdport@
+ Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
+ Device = FileStorage
+ Media Type = File
+}
+
+# Definiton of file storage device
+Storage {
+ Name = File1
+ Address = @hostname@ # N.B. Use a fully qualified name here
+ SDPort = @sdport@
+ Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9"
+ Device = FileStorage
+ Media Type = File1
+}
+
+# Standard Restore template, to be changed by Console program
+Job {
+ Name = "RestoreFiles"
+ Type = Restore
+ Client=@hostname@-fd
+ FileSet="Full Set"
+ Storage = File1
+ Messages = Standard
+ Pool = Default
+ Where = @tmpdir@/bacula-restores
+ Max Run Time = 30min
+}
+
+# Generic catalog service
+Catalog {
+ Name = MyCatalog
+ @libdbi@
+ 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, !terminate
+# operator = @job_email@ = mount
+ console = all
+
+ append = "@working_dir@/log" = all, !skipped
+ catalog = all, !skipped
+}
+
+Messages {
+ Name = NoEmail
+ mailcommand = "@sbindir@/bsmtp -h localhost -f \"\(Bacula regression\) %r\" -s \"Regression: %t %e of %c %l\" %r"
+ console = all, !skipped, !terminate, !restored
+ append = "@working_dir@/log" = all, !skipped
+ catalog = all, !skipped
+}
+
+
+# Default pool definition
+Pool {
+ Name = Default
+ Pool Type = Backup
+ Recycle = yes # Bacula can automatically recycle Volumes
+ AutoPrune = yes # Prune expired volumes
+ Volume Retention = 365d # one year
+}
JobBackup4="PluginK8STestProtocol4"
JobBackup5="PluginK8STestProtocol5"
JobBackup6="PluginK8STestProtocol6"
+JobBackup7="PluginK8STestProtocol7"
Plugin="kubernetes:"
. scripts/functions
--- /dev/null
+#!/bin/sh
+#
+# Copyright (C) 2020 Radosław Korzeniewski
+# License: BSD 2-Clause; see file LICENSE-FOSS
+#
+
+TestName="openshift-plugin-protocol-test"
+JobBackup1="PluginK8STestProtocol1"
+FilesetBackup1="TestPluginK8SSetProtocol1"
+FilesetBackup5="TestPluginK8SSetProtocol5"
+JobBackup2="PluginK8STestProtocol2"
+JobBackup3="PluginK8STestProtocol3"
+JobBackup4="PluginK8STestProtocol4"
+JobBackup5="PluginK8STestProtocol5"
+JobBackup6="PluginK8STestProtocol6"
+JobBackup7="PluginK8STestProtocol7"
+Plugin="openshift:"
+
+. scripts/functions
+
+# export debug=1
+
+scripts/cleanup
+scripts/copy-openshift-plugin-confs
+make -C ${src}/src/plugins/fd/openshift install-test-plugin
+
+. scripts/metaplugin-protocol-tests.sh
--- /dev/null
+#!/bin/sh
+#
+# Copyright (C) 2020 Radosław Korzeniewski
+# License: BSD 2-Clause; see file LICENSE-FOSS
+#
+
+TestName="rhv-plugin-protocol-test"
+JobBackup1="PluginRHEVTestProtocol1"
+FilesetBackup1="TestPluginRHEVSetProtocol1"
+JobBackup2="PluginRHEVTestProtocol2"
+JobBackup3="PluginRHEVTestProtocol3"
+JobBackup4="PluginRHEVTestProtocol4"
+JobBackup5="PluginRHEVTestProtocol5"
+JobBackup6="PluginRHEVTestProtocol6"
+JobBackup7="PluginRHEVTestProtocol7"
+Plugin="rhv:"
+
+. scripts/functions
+
+# export debug=1
+
+scripts/cleanup
+scripts/copy-rhv-plugin-confs
+make -C ${src}/src/plugins/fd/rhv/src install-test-plugin
+
+. scripts/metaplugin-protocol-tests.sh
--- /dev/null
+#!/bin/sh
+#
+# Copyright (C) 2020 Radosław Korzeniewski
+# License: BSD 2-Clause; see file LICENSE-FOSS
+#
+
+TestName="swift-plugin-protocol-test"
+JobBackup1="PluginSWIFTTestProtocol1"
+FilesetBackup1="TestPluginSWIFTSetProtocol1"
+JobBackup2="PluginSWIFTTestProtocol2"
+JobBackup3="PluginSWIFTTestProtocol3"
+JobBackup4="PluginSWIFTTestProtocol4"
+JobBackup5="PluginSWIFTTestProtocol5"
+JobBackup6="PluginSWIFTTestProtocol6"
+JobBackup7="PluginSWIFTTestProtocol7"
+Plugin="swift:"
+
+. scripts/functions
+
+# export debug=1
+
+scripts/cleanup
+scripts/copy-swift-plugin-confs
+make -C $src/src/plugins/fd/swift/src install-test-plugin
+
+. scripts/metaplugin-protocol-tests.sh