
Moving Files from One Server to Another *Nix
Site migration can be awful cumbersome at times. I recently had to move a client's site from off their old host to a new one and wanted to expedite the process of moving a million image files. Here's a dandy little script that saved me hours.
Open up a new terminal window and use the following commands (you’ll have to be sure the connecting server allows SSH connections before performing the following remote commands):
Remote Server to Local Folder
rsync -avz [email protected]:target_folder/ destination_folder/
Local Folder to Remote Server
rsync -avz target_folder/ [email protected]:destination_folder/
Remote Server to Remote Server
rsync -avz [email protected]:target_folder/ [email protected]:destination_folder/
Local Folder to Local Folder
rsync -avz target_folder/ destination_folder/
You will then be prompted to use the password to the connecting server. Voila!