SFTP="${STORE##pexpect+scp://}"
HOST="${SFTP%%/*}"
REMOTEDIR="${SFTP#*/}"
-SFTP="sftp://$SFTP"
+SFTP="sftp://$SFTP" # openssh-client=1:8.4p1-5+deb11u1
+#SFTP="$HOST:$REMOTEDIR" # openssh-client=1:7.6p1-4ubuntu0.7
# Obtain remote pathnames with from-to prefix in reverse date order,
# i.e., newest first.
FILES=( $(remote_from_to_month_prefix) )
if [ -n "$FILES" ] ; then
- THATMONTH="${FILES[0]:6:6}" # to-month of newest
+ THATMONTH="${FILES[0]:0:6}" # to-month of newest
if [ "$THISMONTH" != "$THATMONTH" ] ; then
echo "** New monthly snapshot; stashing daily into .$THATMONTH" >&2
{ # Generate command stream for sftp