Archive for the ‘CentOs’ Category

SSH Copy files from one server to another using rsync clie tool

Wednesday, December 12th, 2007

Ok so you have a file and want to move it to another server on another network. What to do what to do. Well you could just FTP it to your local machine then FTP it up to the new server, but this file is 300mb and that would take a long time. Being the lazy programmer you are you may seek another more ‘geek friendly’ way of doing this. There is a tool called rsync that does just that. It will login to one server, shake hands and then begin transferring your data to the specified new directory. I tested this on BlueHost and no dice. Authentication failed however I am sure if you have time to try and configure the two machines to talk you could do it. This would be great if you had root access to both machines. In my case I only have root to the destination server and not the source server. BlueHost technical support said that the port rsync uses is blocked. Im not sure what that port is but if you found out you could configure rsync as a daemon service and bind it to that port. I will be looking into this in the future and posting more about it in a follow up post.

Happy tunneling.

rsync -av -e ssh username@oldserverhost:/home/old_home/ /home/new_home/

This command was gracefully copied from [Tony Spencer's Website] it’s a great website I highly recomend it if you like my site (even has the same ndesign Word Press theme as my blog).