I bought a VPS yesterday and migrated the VM to VPS. the migration process must be data transfer. In the past, the data migration mode for VM instances was very inefficient. The old host package download-> upload and decompress the new host. Because the home network bandwidth is very low, and the upstream speed of ADSL is kbps, as a result, the previous website migration is definitely physical...
Now with VPS and shell, this process is extremely simple. With the help of the large bandwidth of the data center, it is simply a pleasure to directly transfer files to the data center.
Now let's talk about the method:
1. Pack and back up the whole site site.tar.gz on the old VM
2. Use wgetto download site.tar.gz from the old virtual machine in the shellof vpsand use the FTP protocol.
Wget -- ftp-user = username -- ftp-password = password-m-nh ftp://xxx.xxx.xxx.xxx/xxx/xxx/site.tar.gz
Wget -- ftp-user = username -- ftp-password = password-r-m-nh ftp://xxx.xxx.xxx.xxx/xxx/xxx /*
The above is the command, and the FTP user name and password parameters are not explained;
-R (optional) indicates recursive download. this parameter is required if the entire directory is directly downloaded;
-M indicates the image, not explained;
-Nh indicates that no hierarchical directories are generated and are directly displayed from the current directory. It is a very good parameter;
The ftp address is followed by the slash (*) indicating to download all the files in the directory. If only one file is used, enter the file name directly.