diff --git a/README.md b/README.md index aec5419..fc67fff 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,7 @@ This scripts will be stored in a configurable scripts directory: | `restic_failure_mail_to` | `root` || | `restic_non_root_setup` | `false` | Installs Restic as a specific user with read-only rights. (See [restic docs](https://restic.readthedocs.io/en/stable/080_examples.html#backing-up-your-system-without-running-restic-as-root))| | `restic_non_root_setup_user` | `restic` || +| `restic_gomaxprocs` | not defined | By default, restic [uses all available CPU cores](https://restic.readthedocs.io/en/stable/047_tuning_backup_parameters.html#cpu-usage). Use this variable to limit the number of used CPU cores. | ### Repos diff --git a/templates/restic_access.j2 b/templates/restic_access.j2 index cf897da..0c5ad14 100644 --- a/templates/restic_access.j2 +++ b/templates/restic_access.j2 @@ -22,6 +22,9 @@ export B2_ACCOUNT_ID='{{ restic_repos[item.repo].b2_account_id }}' {% if restic_repos[item.repo].b2_account_key is defined %} export B2_ACCOUNT_KEY='{{ restic_repos[item.repo].b2_account_key }}' {% endif %} +{% if restic_gomaxprocs is defined %} +export GOMAXPROCS={{ restic_gomaxprocs }} +{% endif %} BACKUP_NAME='{{ item.name }}' {% if item.src is defined %} BACKUP_SOURCE='{{ item.src }}'