Compare commits

...

6 Commits

2 changed files with 30 additions and 8 deletions

View File

@@ -19,12 +19,6 @@ all:
backup_dir: /backup/gitea
backup_name_prefix: gitea
max_backups_kept: 3
- container_name: infrastructure-compose-immich-server-1
directories_to_backup:
- /immich
backup_dir: /backup/immich
backup_name_prefix: immich
max_backups_kept: 3
- container_name: infrastructure-compose-web_recipes-1
directories_to_backup:
- /tandoor
@@ -148,7 +142,6 @@ all:
publicworks:
dmz:
games:
monitor:
pfsense_nodes:
hosts:
openocean:

View File

@@ -6,6 +6,12 @@
collections:
- ansible.posix
tasks:
- name: "Log first stage start time"
ansible.builtin.debug:
msg: "{{ now() }}"
run_once: true
delegate_to: blacktide
- name: Mount backup share
ansible.posix.mount:
path: /backup
@@ -123,7 +129,7 @@
delegate_to: blacktide
- name: Docker Infrastructure Compose Backups
hosts: docker_nodes
hosts: docker_nodes,!publicworks
become: true
become_method: sudo
gather_facts: false
@@ -133,6 +139,17 @@
vars:
env_backups_to_keep: 10
tasks:
- name: "Log first stage start time"
ansible.builtin.debug:
msg: "{{ now() }}"
run_once: true
delegate_to: blacktide
- name: Run mount to ensure the /backup directory is present
ansible.builtin.shell:
cmd: "mount -a"
changed_when: false
- name: Run container mounts backup
ansible.builtin.include_role:
name: docker_backup
@@ -189,3 +206,15 @@
path: "{{ item }}"
state: absent
loop: "{{ oldest_file_paths }}"
- name: Trigger rclone backup
hosts: nfsserver
become: true
become_method: sudo
gather_facts: false
tasks:
- name: Run rclone
ansible.builtin.shell:
cmd: "rclone sync /backups dropbox:Backup/infrastructure --progress --dropbox-chunk-size 128M --dropbox-batch-mode sync --dropbox-batch-size 100 --tpslimit 12 --tpslimit-burst 0"
changed_when: false
async: 3600
poll: 60