Upload and download data to server, server to server

1 From windows to linux server

1.1 Xshell and Xftp software support management of SSH connections, support drag-and-drop upload and download of folders/files, ( recommended) (you can use it with a Linux account and password)

  Download link  https://www.xshell.com/zh/free-for-home-school/

Connect (first name and host, then username and password)

 

 

 

1.2 Fliezilla software supports files and folders, drag and drop to upload and download, free, all platforms (Mac, Linux, Windows).

Download link  https://www.filezilla.cn/download/client

linux download 

sudo apt install filezilla

Connection (if the port is not selected, it is the default, and the general cloud server has its own port)

 

2 server to server

2.1 The scp command supports uploading and downloading of files and folders. Since it is executed on the command line, it is slightly more difficult to get started

从<本地文件/文件夹> 上传到 /root/tmp
scp -rP 35394 <本地文件/文件夹> root@xxx:/root/tmp (注意需要在您本地的机器上执行)

2.2 The method of directly scp folder above, if there are many small files, then the speed of scp will be very slow. You can use the following methods to copy the tar stream (the premise is that the local computer has the tar command)

first step

cd <要拷贝的文件夹目录下>

The second step, transfer data

tar cf - * | ssh -p 端口 用户名@XXX "cd 拷贝到的文件目录从更目录开始 && tar xf -"
例如 tar cf - * | ssh -p 46761 [email protected] "cd /root/tmp && tar xf -"

The third step is the copying process (it doesn’t move like this, it’s fine after the transfer is over)

 

Guess you like

Origin blog.csdn.net/qq_42845932/article/details/127928011