X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;f=dupltool;h=b7fb409573f0968a5658f9a13b8b9f56108a9482;hb=HEAD;hp=c72b2c7618f6bd94ce809b6e9c2aadd52d354421;hpb=ed22ffa9a4386df3b48c330bc11f9f8ffbe5bf47;p=rrq%2Fbuckap.git diff --git a/dupltool b/dupltool index c72b2c7..b7fb409 100755 --- a/dupltool +++ b/dupltool @@ -43,14 +43,15 @@ THISMONTH="$(date -u "+%Y%m")" # UTC date 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