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

I'm looking so migrate some websites to a new server. I have SSH access to the current one but only FTP access to the new one.

How can I via Centos and SSH copy entire folders to the new server via FTP?

I can log into the new server via the built in FTP client on Centos but I'm not sure of the commands after this. I need to move the httpdocs folder from the old to the public_html folder of the new server.

I'd love to do this server to server as it'll be a lot quicker than download -> upload via my broadband connection.

Yours,
Chris

share|improve this question

3 Answers 3

up vote 5 down vote accepted

If you can install lftp on the server you have SSH to, try its mirror command:

mirror -R /path/to/httpdocs /path/to/public_html_on_destination_machine
share|improve this answer
    
Very cool thanks, seems to work and for all the Googling in the world I couldn't find that! –  Chris Southam Aug 8 '10 at 14:47

ncftp works well too with get -R

share|improve this answer

Tar/gzip the files and send them that way - you will benefit from compression that you wouldn't have otherwise had, and you may find it easier to preserve permissions.

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.