Commit 5e40c7a9 authored by Jocelyn Delalande's avatar Jocelyn Delalande

borg-ynh-backup: Add an option to backup extra dirs

For dirs not handled by ynh backup system
parent 9cc5f436
......@@ -19,6 +19,12 @@ You can optionaly pass options to the ssh command, ex:
borg_ynh_backup_ssh_options: -p 4242
You can optionaly mention extra dirs to backup:
borg_ynh_backup_extra_dirs:
- "/var/foo"
- "/home/jack"
### Passphrase
You can either :
......
borg_ynh_backup_user: borg
borg_ynh_backup_home: "/home/{{ borg_ynh_backup_user }}"
borg_ynh_backup_extra_dirs: []
borg_ynh_backup_ssh_key: "{{ borg_ynh_backup_home }}/.ssh/id_rsa"
borg_ynh_backup_log_path: /var/log/borg-ynh-backup.log
borg_ynh_backup_tmp_path: /home/yunohost.backup/borg-tmp/
......
......@@ -15,7 +15,7 @@ export BORG_CACHE_DIR="{{ borg_ynh_backup_home }}/.borg/cache"
{{ borg_ynh_backup_borg_path }} create \
-v --stats --compression {{ borg_ynh_backup_compression }} \
"${ARCHIVE}" ${TMP_PATH}
"${ARCHIVE}" ${TMP_PATH} {% for i in borg_ynh_backup_extra_dirs %} {{ i }}{% endfor %}
# Give back the backup cache to the dedicated user
chown -R {{ borg_ynh_backup_user }}:{{ borg_ynh_backup_user }} \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment