Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 09 Dec 2015 16:54:15 +0100
From:      Patrick Hess <>
Subject:   Re: Synchronizing directory hierarchies via SFTP
Message-ID:  <>
In-Reply-To: <op.x9cp8fpeg7njmm@workstation>
References:  <> <> <op.x9cp8fpeg7njmm@workstation>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
Michael Ross wrote:
> You can put it in a file
> 	#!/usr/local/bin/lftp
> 	open sftp://user:pass@host
> 	mirror -v --reverse --dereference ...

Is there an easy way to pass parameters to that file?
I'd like to be able to pass in different source and
target directories to the mirror command.

Meanwhile, I figured out how one is supposed to use
the -c option correctly:

    lftp -c "connect sftp://$SFTP_USERNAME:$SFTP_PASSWORD@$SFTP_SERVER && \
             mirror -v --reverse --dereference --delete --overwrite \
                    --exclude-glob *.swp $LOCAL_DIR $REMOTE_DIR; \

That's at least not as messy as the Expect script.

> That gives you about a week before the script actually exits.

The way I see it, that gives the server about a week
to finally get its stuff together.  ;-)


Want to link to this message? Use this URL: <>