远程Linux服务器到远程Linux服务器dir复制.如何? [英] Remote Linux server to remote linux server dir copy. How?

查看:76
本文介绍了远程Linux服务器到远程Linux服务器dir复制.如何?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将目录(带有子目录和文件)从一台远程Linux服务器复制到另一台远程Linux服务器的最佳方法是什么?我已经使用SSH客户端(如Putty)连接到两者.我对这两个都有根访问权限.

What is the best way to copy a directory (with sub-dirs and files) from one remote Linux server to another remote Linux server? I have connected to both using SSH client (like Putty). I have root access to both.

推荐答案

我通常有两种方法,都使用ssh:

There are two ways I usually do this, both use ssh:

scp -r sourcedir/ user@dest.com:/dest/dir/

或者,更健壮和更快(就传输速度而言)的方法:

or, the more robust and faster (in terms of transfer speed) method:

rsync -auv -e ssh --progress sourcedir/ user@dest.com:/dest/dir/

如果要了解有关每个命令如何工作的更多详细信息,请阅读手册页.

Read the man pages for each command if you want more details about how they work.

这篇关于远程Linux服务器到远程Linux服务器dir复制.如何?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆