From acb59563d8d07f26ce83bb80a3a01fb680f04743 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Mon, 11 Nov 2019 10:10:25 +0100 Subject: Fix verbose ssh rsync backup --- modules/rsync_backup/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/rsync_backup/default.nix b/modules/rsync_backup/default.nix index 2ff47aa4..05177c80 100644 --- a/modules/rsync_backup/default.nix +++ b/modules/rsync_backup/default.nix @@ -127,6 +127,8 @@ let -o PreferredAuthentications=publickey \ -o StrictHostKeyChecking=yes \ -o ClearAllForwardings=yes \ + -o UserKnownHostsFile=/dev/null \ + -o CheckHostIP=no \ -p $PORT \ -i ${ssh_key} \ $DEST backup; then @@ -147,7 +149,7 @@ let ''; backup_profile_tail = name: profile: '' - ssh -i ${ssh_key} -p $PORT $DEST sh -c "date > .cache/last_backup" + ssh -o UserKnownHostsFile=/dev/null -o CheckHostIP=no -i ${ssh_key} -p $PORT $DEST sh -c "date > .cache/last_backup" fi # [ "$skip" != "$DEST" ] ##### End ${name} ##### ''; @@ -169,7 +171,7 @@ let EOF OUT=$RSYNC_OUTPUT/$LOCAL - ${pkgs.rsync}/bin/rsync -XAavbrz --fake-super -e "ssh -i ${ssh_key} -p $PORT" --numeric-ids --delete \ + ${pkgs.rsync}/bin/rsync -XAavbrz --fake-super -e "ssh -o UserKnownHostsFile=/dev/null -o CheckHostIP=no -i ${ssh_key} -p $PORT" --numeric-ids --delete \ --backup-dir=$BAK_BASE/$LOCAL \${ lib.optionalString (part.args != null) "\n ${part.args} \\"}${ lib.optionalString (builtins.length part.exclude_from > 0) "\n --exclude-from=$EXCL_FROM \\"}${ -- cgit v1.2.3