DojoDev
DojoDev

Reputation: 95

How can I download files from one server to another directly?

I have generated SQL files from database tables hosted at my site directory example.com/web/uploads/table.sql. I want to download these tables one by one directly to my NEW server.

I don't want to download files to my local computer and then manually upload to new server.

A friend suggested to use SSH and wget function. So i tried

wget example.com/web/uploads/table.sql

I donn't know where the file went.

Upvotes: 1

Views: 1503

Answers (2)

A.A
A.A

Reputation: 2713

You can achieve the same using -P (Prefix option) . More details: man wget

wget -P /path/to/save example.com/web/uploads/table.sql

Here /path/to/save is location where files will be saved.

Note: if the defined directory does not exist it will get created.

Upvotes: 1

Madison Courto
Madison Courto

Reputation: 1277

This will download to a directory/file you specify;

wget example.com/web/uploads/table.sql -O /path/to/folder/table.sql

https://www.gnu.org/software/wget/manual/wget.html

or

man wget

Upvotes: 1

Related Questions