Implemented deletion of not fully pulled backups

This commit is contained in:
2023-04-25 21:39:44 +02:00
parent 04671e283b
commit 36e41b8c99
22 changed files with 56 additions and 29 deletions

View File

@@ -0,0 +1,7 @@
[Unit]
Description=pull remote backups
OnFailure=systemd-email@%n.service
[Service]
Type=oneshot
ExecStart=/usr/bin/bash {{docker_pull_primary_backups_folder}}pull-remote-backups.sh

View File

@@ -0,0 +1,8 @@
#!/bin/bash
# Pulls the remote backups from multiple hosts
hosts="{{pull_remote_backups}}";
errors=0
for host in $hosts; do
bash {{docker_pull_primary_backups_folder}}pull-remote-backup.sh $host || ((errors+=1));
done;
exit $errors;

View File

@@ -0,0 +1,10 @@
[Unit]
Description=starts pull remote backup timer
[Timer]
OnCalendar={{on_calendar_pull_primary_backups}}
RandomizedDelaySec={{randomized_delay_sec}}
Persistent=false
[Install]
WantedBy=timers.target