♻️: migrate from core to scale
This commit is contained in:
@@ -1,14 +1,17 @@
|
||||
---
|
||||
restic_path: "/mnt/tank/restic/restic"
|
||||
restic_script_path: "/mnt/tank/restic/resticbackup.sh"
|
||||
restic_cache_dir: "/mnt/tank/restic/cache"
|
||||
|
||||
restic_backup_path:
|
||||
- /mnt/tank
|
||||
restic_backup_excluded_path:
|
||||
- /mnt/tank/ix-applications
|
||||
- /mnt/tank/s3/.minio.sys
|
||||
- /mnt/tank/iocage
|
||||
- /mnt/tank/restic/cache
|
||||
restic_backup_hour: 6
|
||||
restic_backup_minute: 45
|
||||
|
||||
ansible_python_interpreter: /usr/local/bin/python3
|
||||
|
||||
restic_aws_access_key_id: "SCW0VAFXE5MN9N8KVHTQ"
|
||||
restic_aws_secret_access_key: !vault |
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
|
@@ -1,4 +1,7 @@
|
||||
---
|
||||
restic_path: "/usr/local/bin/restic"
|
||||
restic_script_path: "/usr/local/bin/resticbackup.sh"
|
||||
restic_cache_dir: ""
|
||||
|
||||
restic_pass: !vault |
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
|
@@ -17,3 +17,12 @@
|
||||
mode: "0o755"
|
||||
owner: root
|
||||
group: "{{ restic_exe_group }}"
|
||||
|
||||
- name: Create cache dir
|
||||
ansible.builtin.file:
|
||||
name: "{{ restic_cache_dir }}"
|
||||
state: directory
|
||||
owner: root
|
||||
group: "{{ restic_exe_group }}"
|
||||
mode: "0o700"
|
||||
when: restic_cache_dir | length > 0
|
||||
|
@@ -7,7 +7,7 @@ export AWS_ACCESS_KEY_ID="{{ restic_aws_access_key_id }}"
|
||||
export 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 %}
|
||||
{{ restic_path }} backup {% if restic_cache_dir | length > 0 %}--cache-dir {{ restic_cache_dir }}{% endif %} --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 -y 1
|
||||
|
@@ -1,11 +1,7 @@
|
||||
---
|
||||
|
||||
restic_version: "0.17.1"
|
||||
restic_architecture: "amd64"
|
||||
restic_system: "{{ ansible_facts['system'] | lower }}"
|
||||
restic_download_url: "https://github.com/restic/restic/releases/download/v{{ restic_version }}/restic_{{ restic_version }}_{{ restic_system }}_{{ restic_architecture }}.bz2"
|
||||
|
||||
restic_path: "/usr/local/bin/restic"
|
||||
restic_script_path: "/usr/local/bin/resticbackup.sh"
|
||||
|
||||
restic_repository: "s3:{{ restic_s3_url }}/{{ inventory_hostname }}"
|
||||
|
Reference in New Issue
Block a user