The first directory on the mirror command line is the source, the second is
the destination. With -R the source is local and the target is remote. So
in your case you have to change the argument order.

пт, 21 апр. 2017, 18:35 Alan Steel <a...@visagemobile.com>:

> We are trying to replicate a local server directory structure to an FTP
> server – these directories exist on the local server, but do not yet exist
> on the FTP server.
>
> I think we are not using the correct combination of slashes at the
> beginning and/or end of the “source” and “target.”
>
>
>
> Following is our current batch file…
>
>
>
> #!/bin/bash
>
> set -x
>
>
>
> FTPHOST='ourcompany.hostedftp.com'
>
> FTPUSER=ouru...@ourcompany.com
>
> FTPPASS=ftppassword
>
> FTPREMOTEFOLDER=/Servers/TestN01IL01/
>
> FTPLOCALFOLDER=/opt/ftpusers/home
>
> FTPLOGFILE=/home/mysusername/ftp/lftp.log
>
>
>
> /usr/local/bin/lftp sftp://$FTPUSER:$FTPPASS@$FTPHOST -e "
>
> lcd $FTPLOCALFOLDER
>
> mirror -R --verbose –no-perms -X * $FTPREMOTEFOLDER $FTPLOCALFOLDER
>
> bye
>
> " >> $FTPLOGFILE
>
>
>
> When we run this, we get…
>
> lcd ok, local cwd=/opt/ftpusers/home
>
> mirror: Access failed: /Servers/TestN01IL01: No such file or directory
>
>
>
> Even though there is such a directory on the FTP server, and the login
> user has full access to it.
>
>
>
> Can we use LFTP in this way to create the directory structure on the FTP
> server, and, if so, what should our command look like?
>
>
>
> Thank you!!
>
>
>
> AGS
> _______________________________________________
> lftp mailing list
> lftp@uniyar.ac.ru
> http://univ.uniyar.ac.ru/mailman/listinfo/lftp
>
_______________________________________________
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp

Reply via email to