$dirname = $infos["name"]
$login = $infos["login"]
$host = $infos["host"]
+ $port = if $infos.dig("port") { $infos.dig("port") } else { 22 }
$dest = "$login@$host"
$base = "$mountpoint/$dirname"
$nbr = $infos["nbr"]
##### <%= @dirname %> #####
+PORT="<%= @port %>"
DEST="<%= @dest %>"
BASE="<%= @base %>"
OLD_BAK_BASE=$BASE/older/j
-o PreferredAuthentications=publickey \
-o StrictHostKeyChecking=yes \
-o ClearAllForwardings=yes \
+ -p $PORT \
$DEST backup; then
echo "Fichier de verrouillage backup sur $DEST ou impossible de se connecter" >&2
skip=$DEST
EOF
OUT=$RSYNC_OUTPUT/$LOCAL
-rsync -XAavbrz --fake-super -e ssh --numeric-ids --delete \
+rsync -XAavbrz --fake-super -e "ssh -p $PORT" --numeric-ids --delete \
--backup-dir=$BAK_BASE/$LOCAL \
<%- unless @args.empty? -%>
<%= @args %>\
- ssh $DEST sh -c "date > .cache/last_backup"
+ ssh -p $PORT $DEST sh -c "date > .cache/last_backup"
fi # [ "$skip" != "$DEST" ]
##### End <%= @dirname %> #####