diff options
| author | Jan Tuomi <jan@jantuomi.fi> | 2026-05-28 18:20:28 +0300 |
|---|---|---|
| committer | Jan Tuomi <jan@jantuomi.fi> | 2026-05-28 18:21:44 +0300 |
| commit | 224ef25da57b0957f190ca2e2e3bd0045792cdb8 (patch) | |
| tree | fd139e250968bc8b88bc7e3052d93fac378ea374 /roles/host_prod/templates | |
| parent | da2d3f0fe3eedc6a8949d8b041fedaa8d28e492c (diff) | |
Update backup logic
Diffstat (limited to 'roles/host_prod/templates')
| -rw-r--r-- | roles/host_prod/templates/root_ssh_config.j2 | 5 | ||||
| -rw-r--r-- | roles/host_prod/templates/usr_local_bin_backup.sh.j2 | 8 |
2 files changed, 7 insertions, 6 deletions
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 # ===================================== |
