Skip to content

Commit

Permalink
New {{ docker_data }} backup/restore strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
notthebee committed Oct 8, 2021
1 parent 6e9d88a commit 9820494
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 69 deletions.
Empty file.
11 changes: 4 additions & 7 deletions group_vars/all/vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,8 @@ security_autoupdate_mail_to: "{{ email }}"
security_autoupdate_mail_on_error: true

#
# Docker
# Enable/disable individual Docker containers
#
copy_persistent_data: false

force_copy_persistent_data: false

enable_deconz: true

enable_homeassistant: true
Expand Down Expand Up @@ -145,7 +141,6 @@ enable_timemachine: true
#
# IKEv2
#

ikev2_ondemand: true

#
Expand Down Expand Up @@ -248,10 +243,12 @@ snapraid_runner_smtp_port: "{{ email_smtp_port }}"

snapraid_runner_command: "python3 {{ snapraid_runner_bin }} -c {{ snapraid_runner_conf }}"

# Stop all the docker containers, backup the {{ docker_dir }} to the MergerFS pool, execute the snapraid runner and start the containers back up
# Stopping the containers is necessary – backing up the data folder with the containers running will result in corrputed database files and no files can be changed during the Snapraid sync
snapraid_runner_cron_jobs:
- { job: 'docker stop $(docker ps -q) && rsync -avz --delete --exclude cache {{ docker_dir }} {{ mergerfs_root }}/docker_data && {{ snapraid_runner_command }} && docker start $(docker ps -a -q)', name: 'snapraid_runner', weekday: '0', hour: '3' }

snapraid_runner_delete_threshold: 5000
snapraid_runner_delete_threshold: 999999

snapraid_runner_email_sendon: "error"

Expand Down
4 changes: 0 additions & 4 deletions run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
become: yes

pre_tasks:
- name: Copy persistent data to the server
import_tasks: tasks/copy_persistent_data.yml
tags: containers

- name: Remove snap functionality
import_tasks: tasks/yeet_snaps.yml
tags: nosnaps
Expand Down
30 changes: 0 additions & 30 deletions tasks/backup_persistent_data.yml

This file was deleted.

28 changes: 0 additions & 28 deletions tasks/copy_persistent_data.yml

This file was deleted.

0 comments on commit 9820494

Please sign in to comment.