If you want to transfer files from one server to another in less than a few minutes or in seconds (1GB file or lower), then use wget via SSH. I’ve been using this since I was born and I would like to share it to everyone who’s not using it yet. You can transfer a zip files or many files in one directory level, or the entire directory and its sub directories.
The image above is a screenshot of how fast I downloaded the files from a remote server to my new server. 4.5GB in 7 minutes! Not bad huh?
This guide is for those who have experience in using SSH already. Below is an example of how to transfer files in a specific folder from one server to another server.
Transfer all the files that are in folderfour for the url
wget -r -np -nH –cut-dirs=3 -R index.html http://mydomain.com/folder/foldertwo/folderthree/folderfour
(-r) – It will download all files and subfolders in the directory recursively
(-np) – Don’t go to the upper directory. Only the directory you’re in.
(-nH –cut-dirs=3) – Don’t save files to the host name folder but to folderfour by omitting first 3 folders.
(-R index.html) – excluding index.html files.
If you want to just copy all inside the folder without conditions, just use this method.
wget -r http://mydomain.com/folder/foldertwo/folderthree/folderfour
Then you’re done!