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_dir: /backup/gitea
backup_name_prefix: gitea backup_name_prefix: gitea
max_backups_kept: 3 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 - container_name: infrastructure-compose-web_recipes-1
directories_to_backup: directories_to_backup:
- /tandoor - /tandoor
@@ -148,7 +142,6 @@ all:
publicworks: publicworks:
dmz: dmz:
games: games:
monitor:
pfsense_nodes: pfsense_nodes:
hosts: hosts:
openocean: openocean:

View File

@@ -6,6 +6,12 @@
collections: collections:
- ansible.posix - ansible.posix
tasks: tasks:
- name: "Log first stage start time"
ansible.builtin.debug:
msg: "{{ now() }}"
run_once: true
delegate_to: blacktide
- name: Mount backup share - name: Mount backup share
ansible.posix.mount: ansible.posix.mount:
path: /backup path: /backup
@@ -123,7 +129,7 @@
delegate_to: blacktide delegate_to: blacktide
- name: Docker Infrastructure Compose Backups - name: Docker Infrastructure Compose Backups
hosts: docker_nodes hosts: docker_nodes,!publicworks
become: true become: true
become_method: sudo become_method: sudo
gather_facts: false gather_facts: false
@@ -133,6 +139,17 @@
vars: vars:
env_backups_to_keep: 10 env_backups_to_keep: 10
tasks: 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 - name: Run container mounts backup
ansible.builtin.include_role: ansible.builtin.include_role:
name: docker_backup name: docker_backup
@@ -189,3 +206,15 @@
path: "{{ item }}" path: "{{ item }}"
state: absent state: absent
loop: "{{ oldest_file_paths }}" 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