Files
ansible/roles/restic/templates/resticbackup.sh.j2
2024-07-05 11:53:32 +02:00

14 lines
486 B
Django/Jinja

#!/bin/sh
## Variable
RESTIC_PASSWORD="{{ restic_pass }}"
RESTIC_REPOSITORY="{{ restic_repository }}"
AWS_ACCESS_KEY_ID="{{ restic_aws_access_key_id }}"
AWS_SECRET_ACCESS_KEY="{{ restic_aws_secret_access_key }}"
## lancement de la sauvegarde
{{ restic_path }} backup --exclude-caches {% for i in restic_backup_excluded_path %} -e {{ i }} {% endfor %} {% for i in restic_backup_path %}{{ i }} {% endfor %}
## récupération de l'espace
{{ restic_path }} forget --prune -d 7 -w 4 -m 3