When you ask most people how do you transfer or migrate your site over the common answer is “oh i use Filezilla and download to my local drive then upload to the new directory”.
This is not really the easiest way to migrate but a two step process of downloading the uploading, what if you had to transfer lets say a 200Gb site over. This was the case with our partner Mindarc who is a Digital Agency that looks after some high profile Ecommerce Websites and their client A Learning Place who is hosted on our cloud.
Me being lazy and looking for the easiest way to do something i suggest using this command line to do a DIRECT Site to Site transfer just from terminal from Mac or Linux or use Putty if you are using Windows.
Open up a terminal and enter this:
Now lets dissect and see what the heck this means.
SCP – Secure copy is a means of securely transferring computer files between a local host and a remote host or between two remote hosts
-r parameter – known as recursive, sometimes we need to copy the directory of all the files inside.
-p parameter – Provides modification times, access times, and modes from original files
The first [email protected]:<DIRECTORY OF SOURCE> is the SSH connection username and where the originating files are located so for example it would be something like this:
The second section is where is the remote server where the files are going and which directory will it be placed under, for example:
So the complete command looks something like this.
scp -rp [email protected]126.96.36.199:/var/www/public_html/ firstname.lastname@example.org:/var/www/user/html/website/
It will then ask you for your password twice, the first time is your source password and the second your destination password press enter it should start transferring!
Co-Founder & CEO at iNode Cloud