Skip to content

Commit

Permalink
Add var to limit restic CPU usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Adito5393 committed Mar 14, 2024
1 parent d974339 commit eba728b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 3 additions & 0 deletions templates/restic_access.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}'
Expand Down

0 comments on commit eba728b

Please sign in to comment.