diff --git a/group_vars/all b/group_vars/all index 05e812f8..f72ea1e2 100644 --- a/group_vars/all +++ b/group_vars/all @@ -16,7 +16,7 @@ on_calendar_docker_compose_restart_unhealthy: "*-*-* 09,10,11,12,13,14,15,16,17, on_calendar_pull_primary_backups: "*-*-* 21:30:00" on_calendar_renew_lets_encrypt_certificates: "*-*-* 12,00:30:00" on_calendar_deploy_mailu_certificates: "*-*-* 13,01:30:00" -on_calendar_backup_to_swappable: "*-*-* 09,12,15,18,21,24,03,06:30:00" +on_calendar_backup_to_swappable: "hourly" # Space Variables size_percent_maximum_backup: 75 diff --git a/roles/independent_backup-to-swappable/templates/backup-to-swappable.service.j2 b/roles/independent_backup-to-swappable/templates/backup-to-swappable.service.j2 index 9c90136f..0e66dd3b 100644 --- a/roles/independent_backup-to-swappable/templates/backup-to-swappable.service.j2 +++ b/roles/independent_backup-to-swappable/templates/backup-to-swappable.service.j2 @@ -1,7 +1,8 @@ [Unit] Description=backing up data OnFailure=systemd-email@%n.service +ConditionPathExists={{backup_to_swappable_destination_path}} [Service] Type=oneshot -ExecStart=/usr/bin/bash {{backup_to_swappable_script_path}} \ No newline at end of file +ExecStart=/usr/bin/bash {{backup_to_swappable_script_path}} {{backup_to_swappable_destination_path}} {{backup_to_swappable_source_path}} \ No newline at end of file diff --git a/roles/independent_backup-to-swappable/vars/main.yml b/roles/independent_backup-to-swappable/vars/main.yml index ca44b8f7..0c31a298 100644 --- a/roles/independent_backup-to-swappable/vars/main.yml +++ b/roles/independent_backup-to-swappable/vars/main.yml @@ -1,3 +1,2 @@ backup_to_swappable_folder: "{{path_administrator_scripts}}backup-to-swappable/" -backup_to_swappable_destination_path: "{{backup_to_swappable_destination_path}}backup-to-swappable/" backup_to_swappable_script_path: "{{backup_to_swappable_folder}}backup-to-swappable.sh" \ No newline at end of file