mirror of
https://github.com/roles-ansible/ansible_role_restic_archiver.git
synced 2024-08-16 10:09:49 +02:00
add restic verify to script
This commit is contained in:
parent
933e8c0bbb
commit
2e0a88aa8b
1 changed files with 9 additions and 9 deletions
|
@ -48,14 +48,14 @@ set -euxo pipefail
|
||||||
--prune {% endif %}
|
--prune {% endif %}
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
|
|
||||||
# Settings for Server {{ repo['name'] | string }}
|
# Settings for Server {{ repo['name'] | string }}
|
||||||
export RESTIC_REPOSITORY="{{ repo['location'] }}"
|
export RESTIC_REPOSITORY="{{ repo['location'] }}"
|
||||||
export RESTIC_PASSWORD='{{ repo['password'] | regex_replace('\'', '\'\\\'\'') }}'
|
export RESTIC_PASSWORD='{{ repo['password'] | regex_replace('\'', '\'\\\'\'') }}'
|
||||||
BACKUP_NAME="{{ repo.name }}"
|
BACKUP_NAME="{{ repo.name }}"
|
||||||
|
|
||||||
{{ restic_install_path }}/restic forget {{ retention_pattern(repo) }}
|
restic forget {{ retention_pattern(repo) }}
|
||||||
|
|
||||||
|
restic check
|
||||||
|
|
||||||
{% if repo.archive|default(false) %}
|
{% if repo.archive|default(false) %}
|
||||||
# ARCHIVE Settings for Server "{{ repo['name'] | string }}"
|
# ARCHIVE Settings for Server "{{ repo['name'] | string }}"
|
||||||
|
@ -79,18 +79,18 @@ export RESTIC_PASSWORD='{{ repo['password'] | regex_replace('\'', '\'\\\'\'') }}
|
||||||
# transfer snapshots to archive
|
# transfer snapshots to archive
|
||||||
restic copy
|
restic copy
|
||||||
|
|
||||||
{% if repo.archive_cleanup | default(false) %}
|
{% if repo.archive_cleanup %}
|
||||||
|
|
||||||
|
# ARCHIVE CLEANUP Settings for Server "{{ repo['name'] | string }}"
|
||||||
|
export RESTIC_REPOSITORY="{{ repo['archive_location'] }}"
|
||||||
|
export RESTIC_PASSWORD='{{ repo['archive_password'] | regex_replace('\'', '\'\\\'\'') }}'
|
||||||
|
BACKUP_NAME="{{ repo.name }}_archive"
|
||||||
|
|
||||||
|
restic forget {{ retention_pattern(repo) }}
|
||||||
{{ restic_install_path }}/restic copy --copy-chunker-params
|
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
restic check
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue