From: Ismaƫl Bouya Date: Mon, 11 Nov 2019 09:10:25 +0000 (+0100) Subject: Fix verbose ssh rsync backup X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=acb59563d8d07f26ce83bb80a3a01fb680f04743;p=perso%2FImmae%2FConfig%2FNix%2FNUR.git Fix verbose ssh rsync backup --- 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 \\"}${