远程linux服务器到远程linux服务器大型稀疏文件复制 - 如何?
我有两台 CentOS 5.4 服务器,每台服务器上都安装了 VMware Server。
假设我始终对 vmware 虚拟机使用稀疏文件,将虚拟机文件从一台服务器复制到另一台服务器的最可靠、最快速的方法是什么?
虚拟机的文件复制起来很痛苦,因为它们非常大(50 GB),但由于它们是稀疏文件,我认为可以采取一些措施来提高复制速度。
I have two twins CentOS 5.4 servers with VMware Server installed on each.
What is the most reliable and fast method for copying virtual machines files from one server to the other, assuming that I always use sparse file for my vmware virtual machines?
The vm's files are a pain to copy since they are very large (50 GB) but since they are sparse files I think something can be done to improve the speed of the copy.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
如果您想快速复制大量数据,通过 SSH 的 rsync 不适合您。由于运行
rsync
守护进程进行快速一次性复制也有些过分,所以老的tar
和nc
可以按如下方式实现这一点。创建将通过网络提供文件的进程:
请注意,可能需要
tar
很长时间来检查稀疏文件,因此暂时看不到任何进展是正常的。并在另一端接收包含以下内容的文件:
或者,如果您想获得所有精彩,请使用
pv
显示进度:稍等一下,直到您看到
pv
报告一些字节已经通过,然后在另一端启动接收器:If you want to copy large data quickly,
rsync
over SSH is not for you. As running anrsync
daemon for quick one-shot copying is also overkill, yer oldetar
andnc
do the trick as follows.Create the process that will serve the files over network:
Note that it may take
tar
a long time to examine sparse files, so it's normal to see no progress for a while.And receive the files with the following at the other end:
Alternatively, if you want to get all fancy, use
pv
to display progress:Wait a little until you see that
pv
reports that some bytes have passed by, then start the receiver at the other end:您是否尝试过 rsync 与选项
--sparse
(可能通过 ssh)?来自
man rsync
:Have you tried rsync with the option
--sparse
(possibly over ssh)?From
man rsync
:由于 rsync 复制稀疏文件的速度非常慢,因此我通常使用
tar
而不是ssh
:Since
rsync
is terribly slow at copying sparse file, I usually resort usingtar
overssh
:您可以查看 http://www.barricane.com/virtsync
(免责声明:我是作者。)
You could have a look at http://www.barricane.com/virtsync
(Disclaimer: I am the author.)