backups: do backup rotation ourselves instead of relying on zfs-auto-snapshot

This commit is contained in:
Franzi 2022-01-05 09:53:18 +01:00
parent b6eb12ed90
commit c9054a243a
Signed by: kunsi
GPG key ID: 12E3D2136B818350
7 changed files with 169 additions and 13 deletions

View file

@ -3,8 +3,10 @@
statusfile=/var/tmp/backup.monitoring
ssh_login="${username}@${server}"
ssh_cmnd="ssh -o IdentityFile=/etc/backup.priv -o StrictHostKeyChecking=accept-new -p ${port}"
nodename="${node.name}"
<%text>
[[ -n "$DEBUG" ]] && set -x
NL=$'\n'
if ! [[ -f /etc/backup.priv ]]
@ -59,6 +61,8 @@ do_backup() {
}
rsync_errors=""
$ssh_cmnd $ssh_login "sudo /usr/local/bin/rotate-single-backup-client $nodename"
</%text>
% for path in sorted(paths):