Download folders from ftp to ssh

Often a situation arises when we need to copy data from one hosting to another, and in this case we often lose a lot of time downloading from one resource to the local computer and uploading to another server. This is especially annoying if your local speed is very low and there is a constant disconnection.

In this case, it would be much faster and easier to download data directly from one server to another. This can be done using ssh and the wget utility.

For example, we have host1 and host2. On host2 we have a bd folder that we need to copy to host1.

We need to connect to host1 via ssn and execute the command

wget -r 'ftp://host2_username:host2_password@host2_IP/bd'

This way we will download the folder directly from host2 to host1.

Often, such a jump is faster and more stable than through a local computer. In my case, 800 MB data was downloaded in less than 2 minutes in this way.

Простий текст

  • Не дозволено жодних HTML теґів.
  • Рядки й абзаци переносяться автоматично.
  • Адреси вебсторінок та адреси електронної пошти автоматично перетворюються у посилання.
Код мови коментаря.