From 0e118a8c5326134b6e421e2d23fba0f211f8d964 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Isma=C3=ABl=20Bouya?= Date: Mon, 11 Nov 2019 10:10:25 +0100 Subject: [PATCH] Fix verbose ssh rsync backup --- modules/rsync_backup/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/rsync_backup/default.nix b/modules/rsync_backup/default.nix index 2ff47aa..05177c8 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 \\"}${ -- 2.41.0