]> git.immae.eu Git - perso/Immae/Config/Nix/NUR.git/commitdiff
Fix verbose ssh rsync backup
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Mon, 11 Nov 2019 09:10:25 +0000 (10:10 +0100)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Fri, 24 Apr 2020 22:04:31 +0000 (00:04 +0200)
modules/rsync_backup/default.nix

index 2ff47aa48906df5429bd758750d212d8cac7ded9..05177c80a4878dfbda2565bfc13ea649e93003b4 100644 (file)
@@ -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 \\"}${