Wget batch download of files on remote FTP Server

Source: Internet
Author: User
Tags remote ftp server ftp protocol

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.