diff --git a/README.md b/README.md index fc6bc09..471177d 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,7 @@ $ git clone https://github.com/borgbase/ansible-role-borgbackup.git roles/borgba - `borg_lock_wait_time`: Config maximum seconds to wait for acquiring a repository/cache lock. Defaults to 5 seconds. - `borg_ssh_command`: Command to use instead of just "ssh". This can be used to specify ssh options. - `borg_remote_path`: Path to the borg executable on the remote. It will default to `borg`. +- `borg_remote_rate_limit`: Remote network upload rate limit in kiBytes/second. - `borg_encryption_passcommand`: The standard output of this command is used to unlock the encryption key. - `borg_retention_policy`: Retention policy for how many backups to keep in each category (daily, weekly, monthly, etc). - `ssh_key_file`: Path to a private ssh key file (default is `.ssh/id_ed25519`). It generates a ed25519 key if the file doesn't exist yet. diff --git a/defaults/main.yml b/defaults/main.yml index b73927b..7a613e1 100755 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -14,6 +14,7 @@ borg_encryption_passcommand: false borg_lock_wait_time: 5 borg_ssh_command: false borg_remote_path: false +borg_remote_rate_limit: 0 borg_retention_policy: keep_hourly: 3 keep_daily: 7 diff --git a/templates/config.yaml.j2 b/templates/config.yaml.j2 index 1911acb..0d457f4 100644 --- a/templates/config.yaml.j2 +++ b/templates/config.yaml.j2 @@ -66,7 +66,9 @@ storage: compression: auto,zstd # Remote network upload rate limit in kiBytes/second. - #remote_rate_limit: 5000 +{% if borg_remote_rate_limit %} + remote_rate_limit: {{ borg_remote_rate_limit }} +{% endif %} # Command to use instead of just "ssh". This can be used to specify ssh options. # ssh_command: ssh -i ~/.ssh/id_ed25519