aboutsummaryrefslogtreecommitdiff
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>2019-11-11 10:10:25 +0100
commit0e118a8c5326134b6e421e2d23fba0f211f8d964 (patch)
treedf569dc9b563138e91ae77af5722d3fd02c6532c
parentdc6d3af99aba4a81a2578cd10ccbc63603381ac5 (diff)
downloadNix-0e118a8c5326134b6e421e2d23fba0f211f8d964.tar.gz
Nix-0e118a8c5326134b6e421e2d23fba0f211f8d964.tar.zst
Nix-0e118a8c5326134b6e421e2d23fba0f211f8d964.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 2ff47aa..05177c8 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 \\"}${