Commit d70cfe51 authored by Jocelyn Delalande's avatar Jocelyn Delalande

ynh-borg-backup: Add a variable for ssh options

parent b11c6fc2
......@@ -15,6 +15,9 @@ Backup Yunohost, via borg, to a remote repository over SSH.
- borg_ynh_backup_weekly: 4
- borg_ynh_backup_daily: 7
You can optionaly pass options to the ssh command, ex:
borg_ynh_backup_ssh_options: -p 4242
### Passphrase
......
......@@ -8,7 +8,7 @@ REPOSITORY={{ borg_ynh_backup_repository }}
ARCHIVE_NAME=$1
ARCHIVE="${REPOSITORY}::${ARCHIVE_NAME}"
export BORG_RSH="ssh -i {{ borg_ynh_backup_ssh_key }}"
export BORG_RSH="ssh -i {{ borg_ynh_backup_ssh_key }} {{ borg_ynh_backup_ssh_options }}"
export BORG_PASSPHRASE="`cat {{ borg_ynh_backup_passphrase_path }}`"
export BORG_KEYS_DIR="{{ borg_ynh_backup_home }}/.borg/keys"
export BORG_CACHE_DIR="{{ borg_ynh_backup_home }}/.borg/cache"
......
......@@ -11,7 +11,7 @@ LOG_PATH=/var/log/borg-ynh-backup.log
REPOSITORY={{ borg_ynh_backup_repository }}
BACKUP_DATE=`date +%Y-%m-%d`
ARCHIVE=${REPOSITORY}::$BACKUP_DATE
export BORG_RSH="ssh -i {{ borg_ynh_backup_ssh_key }}"
export BORG_RSH="ssh -i {{ borg_ynh_backup_ssh_key }} {{ borg_ynh_backup_ssh_options }}"
export BORG_PASSPHRASE="`cat {{ borg_ynh_backup_passphrase_path }}`"
export BORG_KEYS_DIR="{{ borg_ynh_backup_home }}/.borg/keys"
export BORG_CACHE_DIR="{{ borg_ynh_backup_home }}/.borg/cache"
......
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