Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/bareos/bareos.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Steffens <joerg.steffens@bareos.com>2015-09-16 14:41:19 +0300
committerMarco van Wieringen <marco.van.wieringen@bareos.com>2015-09-16 21:32:19 +0300
commita1b99aa80181cd08ee4f988050589bfe7d953ac4 (patch)
tree23e0aaf7a2846c22e3a2d3a85b21d92827002e9f
parent105077321d7b0cee40cb04112121c701ab8e9b6b (diff)
Cephfs-, Rados- and Gfapi-plugins: added examplesRelease/15.2.1
add an example configuration file for each of these plugins.
-rw-r--r--debian/bareos-filedaemon-ceph-plugin.install.in2
-rw-r--r--platforms/packaging/bareos.spec3
-rw-r--r--src/plugins/filed/Makefile.in6
-rw-r--r--src/plugins/filed/cephfs-fd.c6
-rw-r--r--src/plugins/filed/plugin-cephfs.conf36
-rw-r--r--src/plugins/filed/plugin-gfapi.conf35
-rw-r--r--src/plugins/filed/plugin-rados.conf37
7 files changed, 122 insertions, 3 deletions
diff --git a/debian/bareos-filedaemon-ceph-plugin.install.in b/debian/bareos-filedaemon-ceph-plugin.install.in
index 7aa7dd0db..51f82ecc6 100644
--- a/debian/bareos-filedaemon-ceph-plugin.install.in
+++ b/debian/bareos-filedaemon-ceph-plugin.install.in
@@ -1,2 +1,4 @@
@plugindir@/cephfs-fd.so
@plugindir@/rados-fd.so
+/etc/bareos/bareos-dir.d/plugin-cephfs.conf
+/etc/bareos/bareos-dir.d/plugin-rados.conf
diff --git a/platforms/packaging/bareos.spec b/platforms/packaging/bareos.spec
index 4deaf9ec6..a7e8c0593 100644
--- a/platforms/packaging/bareos.spec
+++ b/platforms/packaging/bareos.spec
@@ -1151,12 +1151,15 @@ echo "This is a meta package to install a full bareos system" > %{buildroot}%{_d
%if 0%{?glusterfs}
%files filedaemon-glusterfs-plugin
%{plugin_dir}/gfapi-fd.so
+%attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{_sysconfdir}/bareos/bareos-dir.d/plugin-gfapi.conf
%endif
%if 0%{?ceph}
%files filedaemon-ceph-plugin
%{plugin_dir}/cephfs-fd.so
%{plugin_dir}/rados-fd.so
+%attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{_sysconfdir}/bareos/bareos-dir.d/plugin-cephfs.conf
+%attr(0640, %{director_daemon_user}, %{daemon_group}) %config(noreplace) %{_sysconfdir}/bareos/bareos-dir.d/plugin-rados.conf
%endif
#
diff --git a/src/plugins/filed/Makefile.in b/src/plugins/filed/Makefile.in
index e877294c3..37b1d9bb9 100644
--- a/src/plugins/filed/Makefile.in
+++ b/src/plugins/filed/Makefile.in
@@ -93,14 +93,18 @@ plugtest: Makefile fd_plugins.c fileset.c \
install: all
$(MKDIR) $(DESTDIR)$(plugindir)
+ $(MKDIR) ${DESTDIR}${confdir}/bareos-dir.d/
$(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) bpipe-fd.la $(DESTDIR)$(plugindir)
$(RMF) $(DESTDIR)$(plugindir)/bpipe-fd.la
@for plugin in $(BUILD_PLUGINS); do \
$(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) $$plugin $(DESTDIR)$(plugindir); \
$(RMF) $(DESTDIR)$(plugindir)/$$plugin; \
+ CONF=`echo $$plugin | sed 's/\(.*\)-fd.la$$/plugin-\1.conf/'`; \
+ if [ -e "$$CONF" ]; then \
+ $(INSTALL_CONFIG) $$CONF ${DESTDIR}${confdir}/bareos-dir.d/; \
+ fi; \
done
$(CP) *.py *.py.template $(DESTDIR)$(plugindir)
- $(MKDIR) ${DESTDIR}${confdir}/bareos-dir.d/
$(INSTALL_CONFIG) plugin-python-ldap.conf ${DESTDIR}${confdir}/bareos-dir.d/
install-test-plugin: all
diff --git a/src/plugins/filed/cephfs-fd.c b/src/plugins/filed/cephfs-fd.c
index aa44fc7a0..7eecee7fb 100644
--- a/src/plugins/filed/cephfs-fd.c
+++ b/src/plugins/filed/cephfs-fd.c
@@ -37,7 +37,7 @@ static const int dbglvl = 150;
#define PLUGIN_DATE "February 2015"
#define PLUGIN_VERSION "1"
#define PLUGIN_DESCRIPTION "Bareos CEPHFS File Daemon Plugin"
-#define PLUGIN_USAGE "cephfs:configfile=<path_to_config>:basedir=<basedir>:"
+#define PLUGIN_USAGE "cephfs:conffile=<ceph_conf_file>:basedir=<basedir>:"
#define CEPHFS_PATH_MAX 4096
@@ -156,7 +156,9 @@ struct plugin_argument {
};
static plugin_argument plugin_arguments[] = {
+ /* configfile: deprecated, use conffile instead (same as the other plugins and backends) */
{ "configfile", argument_conffile },
+ { "conffile", argument_conffile },
{ "basedir", argument_basedir },
{ NULL, argument_none }
};
@@ -819,7 +821,7 @@ static inline void set_string(char **destination, char *value)
*
* The definition is in this form:
*
- * cephfs:configfile=<path_to_config>:basedir=<basedir>:
+ * cephfs:conffile=<path_to_config>:basedir=<basedir>:
*/
static bRC parse_plugin_definition(bpContext *ctx, void *value)
{
diff --git a/src/plugins/filed/plugin-cephfs.conf b/src/plugins/filed/plugin-cephfs.conf
new file mode 100644
index 000000000..b33653fef
--- /dev/null
+++ b/src/plugins/filed/plugin-cephfs.conf
@@ -0,0 +1,36 @@
+#
+# to use the Bareos Cephfs plugin,
+# include this configuration file in bareos-dir.conf by
+# @/etc/bareos/bareos-dir.d/plugin-cephfs.conf
+# and adapt it to your requirements.
+#
+
+FileSet {
+ Name = "plugin-cephfs"
+ Include {
+ Options {
+ aclsupport = yes
+ signature = MD5
+ xattrsupport = yes
+ }
+ # adapt this to your environment
+ # basedir: optional, othewrwise all data will be backuped
+ Plugin = "cephfs:conffile=<ceph_conf_file>:basedir=<basedir>:"
+ }
+}
+
+Job {
+ Name = "BackupCephfs"
+ JobDefs = "DefaultJob"
+ FileSet = "plugin-cephfs"
+ # Client = "cephfshost-fd"
+}
+
+Job {
+ Name = "RestoreCephfs"
+ JobDefs = "DefaultJob"
+ Type = Restore
+ Fileset= "plugin-cephfs"
+ # Client = "cephfshost-fd"
+}
+
diff --git a/src/plugins/filed/plugin-gfapi.conf b/src/plugins/filed/plugin-gfapi.conf
new file mode 100644
index 000000000..cd9927ba1
--- /dev/null
+++ b/src/plugins/filed/plugin-gfapi.conf
@@ -0,0 +1,35 @@
+#
+# to use the Bareos GFAPI plugin,
+# include this configuration file in bareos-dir.conf by
+# @/etc/bareos/bareos-dir.d/plugin-gfapi.conf
+# and adapt it to your requirements.
+#
+
+FileSet {
+ Name = "plugin-gfapi"
+ Include {
+ Options {
+ aclsupport = yes
+ signature = MD5
+ xattrsupport = yes
+ }
+ # adapt this to your environment
+ Plugin = "gfapi:volume=gluster\\://glusterhost.example.com/dvol1/data:"
+ }
+}
+
+Job {
+ Name = "BackupGFAPI"
+ JobDefs = "DefaultJob"
+ FileSet = "plugin-gfapi"
+ # Client = "gfapihost-fd"
+}
+
+Job {
+ Name = "RestoreGFAPI"
+ JobDefs = "DefaultJob"
+ Type = Restore
+ Fileset= "plugin-gfapi"
+ # Client = "gfappihost-fd"
+}
+
diff --git a/src/plugins/filed/plugin-rados.conf b/src/plugins/filed/plugin-rados.conf
new file mode 100644
index 000000000..73cecf9c9
--- /dev/null
+++ b/src/plugins/filed/plugin-rados.conf
@@ -0,0 +1,37 @@
+#
+# to use the Bareos Rados (Ceph) plugin,
+# include this configuration file in bareos-dir.conf by
+# @/etc/bareos/bareos-dir.d/plugin-rados.conf
+# and adapt it to your requirements.
+#
+
+FileSet {
+ Name = "plugin-rados"
+ Include {
+ Options {
+ aclsupport = yes
+ signature = MD5
+ xattrsupport = yes
+ }
+ # adapt this to your environment
+ # namespace: optional
+ # snapshotname: optional (a snapshot in any case)
+ Plugin = "rados:conffile=<ceph_conf_file>:poolname=<pool_name>:namespace=<name_space>:snapshotname=<snapshot_name>:"
+ }
+}
+
+Job {
+ Name = "BackupRados"
+ JobDefs = "DefaultJob"
+ FileSet = "plugin-rados"
+ # Client = "radoshost-fd"
+}
+
+Job {
+ Name = "RestoreRados"
+ JobDefs = "DefaultJob"
+ Type = Restore
+ Fileset= "plugin-rados"
+ # Client = "radoshost-fd"
+}
+