engine opts added
PROD-18192
Change-Id: I97a1339c5f71e0e2abcc348238e34f019362700a
diff --git a/README.rst b/README.rst
index cd3bbaa..312ad4d 100644
--- a/README.rst
+++ b/README.rst
@@ -30,6 +30,19 @@
host: 10.10.10.208
user: backupninja
+Backup client with ssh/rsync remote target with specific rsync options
+
+.. code-block:: yaml
+
+ backupninja:
+ client:
+ enabled: true
+ target:
+ engine: rsync
+ engine_opts: "-av --delete --recursive --safe-links"
+ host: 10.10.10.208
+ user: backupninja
+
Backup client with s3 remote target
.. code-block:: yaml
diff --git a/backupninja/files/rdiff.conf b/backupninja/files/rdiff.conf
index 2e8bcb3..63e347d 100644
--- a/backupninja/files/rdiff.conf
+++ b/backupninja/files/rdiff.conf
@@ -19,6 +19,9 @@
##
## Default:
# options =
+{% if client.target.engine_opts is defined %}
+options = {{ client.target.engine_opts }}
+{%- endif %}
## default is 0, but set to 19 if you want to lower the priority.
## an example setting would be:
diff --git a/backupninja/files/rsync.conf b/backupninja/files/rsync.conf
index d45b350..6585112 100644
--- a/backupninja/files/rsync.conf
+++ b/backupninja/files/rsync.conf
@@ -129,7 +129,11 @@
#rsync = $RSYNC
# rsync command options
+{% if client.target.engine_opts is defined %}
+rsync_options = {{ client.target.engine_opts }}
+{%- else %}
#rsync_options = "-av --delete --recursive"
+{%- endif %}
# when set to 1, use numeric ids instead of user/group mappings on rsync
#numericids =