From 4ef68268379d0efa4a371614fe9da7ac7968a4dd Mon Sep 17 00:00:00 2001 From: mwiegand Date: Sun, 27 Mar 2022 17:57:10 +0200 Subject: [PATCH] backup enable host key checking --- bundles/backup/files/backup_path_via_rsync | 2 +- bundles/backup/files/backup_path_via_zfs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bundles/backup/files/backup_path_via_rsync b/bundles/backup/files/backup_path_via_rsync index 307ac6f..d3aa34d 100644 --- a/bundles/backup/files/backup_path_via_rsync +++ b/bundles/backup/files/backup_path_via_rsync @@ -5,7 +5,7 @@ set -exu path=$1 uuid=$(jq -r .client_uuid < /etc/backup/config.json) server=$(jq -r .server_hostname < /etc/backup/config.json) -ssh="ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout=5 backup-receiver@$server" +ssh="ssh -o ConnectTimeout=5 backup-receiver@$server" rsync -av --rsync-path="sudo rsync" "$path/" "backup-receiver@$server:/mnt/backups/$uuid$path/" $ssh sudo zfs snap "tank/$uuid/fs@auto-backup_$(date +"%Y-%m-%d_%H:%M:%S")" diff --git a/bundles/backup/files/backup_path_via_zfs b/bundles/backup/files/backup_path_via_zfs index 6bd7add..b3e7ed8 100644 --- a/bundles/backup/files/backup_path_via_zfs +++ b/bundles/backup/files/backup_path_via_zfs @@ -5,7 +5,7 @@ set -exu path=$1 uuid=$(jq -r .client_uuid < /etc/backup/config.json) server=$(jq -r .server_hostname < /etc/backup/config.json) -ssh="ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout=5 backup-receiver@$server" +ssh="ssh -o ConnectTimeout=5 backup-receiver@$server" source_dataset=$(zfs list -H -o mountpoint,name | grep -P "^$path\t" | cut -d $'\t' -f 2) target_dataset="tank/$uuid/$source_dataset"