Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I´ve a big problem. I have to move data from an old Webspace which is only accessibla by ftp.

No we have a new root server which is accessible by ssh of course :-)

No i Need to move all data from the old space but there is a lot of Gb of files. Is there a way to fetch all files directly from the old ftp to the storage and not over a third station (my local machine)?

I´ve tried it with ftp but without success.

I think I´ve used the wrong commands.

Is there a way to etablish something like this including all files and directorys?

Thank you in advance

Bernhard

share|improve this question

1 Answer 1

Lftp is able to mirror a remote directory to local, or the opposite:

lftp has builtin mirror which can download or update a whole directory tree. There is also reverse mirror (mirror -R) which uploads or updates a directory tree on server. Mirror can also synchronize directories between two remote servers, using FXP if available.

So you just have to install it on your new server, and using it like this:

# lftp ftp://user:pass@server -e "mirror -e /html /var/www/site ; quit"

/html is the remote path, /var/www/site your local. The syntax is very script-friendly, so if you have to schedule this over time, a cron job will do the job !

FXP is like ftp from one server to another, but transfer orders are given from a remote client. And most fxp-capable clients are also able to do SCP, so it should be possible to FXP between the ftp server and the new server, running ssh.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.