Date: Wed, 09 Dec 2015 16:54:15 +0100 From: Patrick Hess <patrickhess@gmx.net> To: freebsd-questions@freebsd.org Subject: Re: Synchronizing directory hierarchies via SFTP Message-ID: <5475394.tzi9gdkkBP@desk8.phess.net> In-Reply-To: <op.x9cp8fpeg7njmm@workstation> References: <13761006.QDN0LtKzYl@desk8.phess.net> <24246596.8z5VK3yfqz@desk8.phess.net> <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; \ quit" 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. ;-) Patrick
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5475394.tzi9gdkkBP>