summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-11-11 10:10:25 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2020-04-25 00:04:31 +0200
commitacb59563d8d07f26ce83bb80a3a01fb680f04743 (patch)
tree6e188c709722da449852a82a26d1f3af0893424a
parentbf5ac71e291975716c0a86627dde04e8d0facc9e (diff)
downloadNUR-acb59563d8d07f26ce83bb80a3a01fb680f04743.tar.gz
NUR-acb59563d8d07f26ce83bb80a3a01fb680f04743.tar.zst
NUR-acb59563d8d07f26ce83bb80a3a01fb680f04743.zip
Fix verbose ssh rsync backup
-rw-r--r--modules/rsync_backup/default.nix6
1 files changed, 4 insertions, 2 deletions
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
127 -o PreferredAuthentications=publickey \ 127 -o PreferredAuthentications=publickey \
128 -o StrictHostKeyChecking=yes \ 128 -o StrictHostKeyChecking=yes \
129 -o ClearAllForwardings=yes \ 129 -o ClearAllForwardings=yes \
130 -o UserKnownHostsFile=/dev/null \
131 -o CheckHostIP=no \
130 -p $PORT \ 132 -p $PORT \
131 -i ${ssh_key} \ 133 -i ${ssh_key} \
132 $DEST backup; then 134 $DEST backup; then
@@ -147,7 +149,7 @@ let
147 ''; 149 '';
148 150
149 backup_profile_tail = name: profile: '' 151 backup_profile_tail = name: profile: ''
150 ssh -i ${ssh_key} -p $PORT $DEST sh -c "date > .cache/last_backup" 152 ssh -o UserKnownHostsFile=/dev/null -o CheckHostIP=no -i ${ssh_key} -p $PORT $DEST sh -c "date > .cache/last_backup"
151 fi # [ "$skip" != "$DEST" ] 153 fi # [ "$skip" != "$DEST" ]
152 ##### End ${name} ##### 154 ##### End ${name} #####
153 ''; 155 '';
@@ -169,7 +171,7 @@ let
169 EOF 171 EOF
170 172
171 OUT=$RSYNC_OUTPUT/$LOCAL 173 OUT=$RSYNC_OUTPUT/$LOCAL
172 ${pkgs.rsync}/bin/rsync -XAavbrz --fake-super -e "ssh -i ${ssh_key} -p $PORT" --numeric-ids --delete \ 174 ${pkgs.rsync}/bin/rsync -XAavbrz --fake-super -e "ssh -o UserKnownHostsFile=/dev/null -o CheckHostIP=no -i ${ssh_key} -p $PORT" --numeric-ids --delete \
173 --backup-dir=$BAK_BASE/$LOCAL \${ 175 --backup-dir=$BAK_BASE/$LOCAL \${
174 lib.optionalString (part.args != null) "\n ${part.args} \\"}${ 176 lib.optionalString (part.args != null) "\n ${part.args} \\"}${
175 lib.optionalString (builtins.length part.exclude_from > 0) "\n --exclude-from=$EXCL_FROM \\"}${ 177 lib.optionalString (builtins.length part.exclude_from > 0) "\n --exclude-from=$EXCL_FROM \\"}${