Mister Jack [EMAIL PROTECTED] writes:
I've been suggested to use wget to retrieve a file by ftp like :
wget ftp://$USER:[EMAIL PROTECTED]/$URI -O $URI-$DATE
which I find nice, but my probleme is that my login contains a @ (
[EMAIL PROTECTED] is my login. Hostname is different from the ftp site
I connect to...)
So it makes :
wget ftp://[EMAIL PROTECTED]:[EMAIL PROTECTED]/home/mybackup.sql.bz2
is there any way to avoid the error : incorrect port number ?
Yes, two ways:
1. Replace @ with %40, which will cause it to not be interpreted
specially:
ftp://login%40myhost:[EMAIL PROTECTED]/home/mybackup.sql.bz2
2. Set the ftp_proxy variable to point to your provider:
export ftp_proxy=ftp://multiftp.provider.com/
wget ftp://mylogin:[EMAIL PROTECTED]/home/mybackup.sql.bz2
Both variants should work equally well -- pick the one you're more
comfortable with. The first one is more direct and will work with
pre-1.9 versions of Wget. The second one maintains the illusion that
you're connecting to your host and that multiftp.provider.com is a
mere proxy.