From 224ef25da57b0957f190ca2e2e3bd0045792cdb8 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Thu, 28 May 2026 18:20:28 +0300 Subject: Update backup logic --- roles/host_prod/templates/root_ssh_config.j2 | 5 +++-- roles/host_prod/templates/usr_local_bin_backup.sh.j2 | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'roles/host_prod/templates') diff --git a/roles/host_prod/templates/root_ssh_config.j2 b/roles/host_prod/templates/root_ssh_config.j2 index 96f78f2..eac9654 100644 --- a/roles/host_prod/templates/root_ssh_config.j2 +++ b/roles/host_prod/templates/root_ssh_config.j2 @@ -1,4 +1,5 @@ Host backup - HostName {{ backup_ssh_host }} - User {{ backup_ssh_user }} + HostName {{ backup.ssh_host }} + User {{ backup.ssh_user }} IdentityFile /root/.ssh/backup + Port {{ backup.ssh_port }} diff --git a/roles/host_prod/templates/usr_local_bin_backup.sh.j2 b/roles/host_prod/templates/usr_local_bin_backup.sh.j2 index f6a0e2c..d610774 100644 --- a/roles/host_prod/templates/usr_local_bin_backup.sh.j2 +++ b/roles/host_prod/templates/usr_local_bin_backup.sh.j2 @@ -3,13 +3,13 @@ set -euo pipefail # ===== CONFIG (filled by Ansible) ===== KEEP_LOCAL=30 -KEEP_REMOTE=10 +KEEP_REMOTE=4 KEYFILE="/root/.ssh/backup" HOST_DIR="backup" -DATASET="{% endraw %}{{ backup_zfs_dataset }}{% raw %}" +DATASET="{% endraw %}{{ backup.zfs_dataset }}{% raw %}" BACKUP_EXCLUDE_PROP="{% endraw %}{{ backup_zfs_exclude_property | default('com.pursotin:backup') }}{% raw %}" -USER="{% endraw %}{{ backup_ssh_user }}{% raw %}" -HOST="{% endraw %}{{ backup_ssh_host }}{% raw %}" +USER="{% endraw %}{{ backup.ssh_user }}{% raw %}" +HOST="{% endraw %}{{ backup.ssh_host }}{% raw %}" EMAIL_TO=root # ===================================== -- cgit v1.3