feat(restic): add optional hook and optional unlock
This commit is contained in:
@ -13,8 +13,14 @@ Environment=RESTIC_PASSWORD={{ restic_repo_password }}
|
||||
Environment=AWS_ACCESS_KEY_ID={{ restic_s3_key_id }}
|
||||
Environment=AWS_SECRET_ACCESS_KEY={{ restic_s3_access_key }}
|
||||
{% endif %}
|
||||
{% if restic_unlock_before_backup %}
|
||||
ExecStartPre=-/bin/sh -c '/usr/bin/restic unlock'
|
||||
{% endif %}
|
||||
|
||||
ExecStartPre=-/bin/sh -c '/usr/bin/restic snapshots || /usr/bin/restic init'
|
||||
{% if restic_backup_pre_hook %}
|
||||
ExecStart=-{{ restic_backup_pre_hook }}
|
||||
{% endif %}
|
||||
{% if restic_backup_stdin_command %}
|
||||
ExecStart=/bin/sh -c '{{ restic_backup_stdin_command }} | /usr/bin/restic backup --verbose --stdin --stdin-filename {{ restic_backup_stdin_command_filename }}'
|
||||
{% else %}
|
||||
|
Reference in New Issue
Block a user