scp的替代方案,通过打开并行连接在linux机器之间传输文件

发布于 2024-09-03 23:59:34 字数 150 浏览 10 评论 0原文

是否有 scp 的替代方案,通过打开并行连接将大文件从一台计算机传输到另一台计算机,并且还能够暂停和恢复下载。

请不要将此信息转移到 severfault.com。我不是系统管理员。我是一名开发人员,试图在备份主机和服务器之间传输过去的数据库转储。

谢谢

Is there an alternative to scp, to transfer a large file from one machine to another machine by opening parallel connections and also able to pause and resume the download.

Please don't transfer this to severfault.com. I am not a system administrator. I am a developer trying to transfer past database dumps between backup hosts and servers.

Thank you

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

佞臣 2024-09-10 23:59:34

您可以尝试使用 split(1) 将文件分开,然后并行 scp 各个部分。然后可以使用“cat”将该文件组合成目标计算机上的单个文件。

# on local host
split -b 1M large.file large.file. # split into 1MiB chunks
for f in large.file.*; do scp $f remote_host: & done

# on remote host
cat large.file.* > large.file

You could try using split(1) to break the file apart and then scp the pieces in parallel. The file could then be combined into a single file on the destination machine with 'cat'.

# on local host
split -b 1M large.file large.file. # split into 1MiB chunks
for f in large.file.*; do scp $f remote_host: & done

# on remote host
cat large.file.* > large.file
柠檬 2024-09-10 23:59:34

看一下 rsync 看看它是否能满足您的需求。

问题的正确放置不是基于您的角色,而是基于问题的类型。由于这与严格的编程无关,因此很可能会被迁移。

Take a look at rsync to see if it will meet your needs.

The correct placement of questions is not based on your role, but on the type of question. Since this one is not strictly programming related it is likely that it will be migrated.

街道布景 2024-09-10 23:59:34

与 Mike K 的回答类似,请查看 https://code.google.com/p/scp- tsunami/ - 它处理分割文件,启动几个 scp 进程来复制各个部分,然后再次加入它们...它还可以复制到多个主机...

 ./scpTsunami.py -v -s -t 9 -b 10m -u dan bigfile.tar.gz /tmp -l remote.host

将文件分割成 10MB 块并使用复制它们9个scp进程...

Similar to Mike K's answer, check out https://code.google.com/p/scp-tsunami/ - it handles splitting the file, starting several scp processes to copy the parts and then joins them again...it can also copy to multiple hosts...

 ./scpTsunami.py -v -s -t 9 -b 10m -u dan bigfile.tar.gz /tmp -l remote.host

That splits the file into 10MB chunks and copies them using 9 scp processes...

讽刺将军 2024-09-10 23:59:34

您正在使用的程序是lftp。它使用 pget 命令支持 sftp 和并行传输。它可以在 Ubuntu 下使用(sudo apt-get install lftp),您可以在这里阅读它的评论:

http://www.cyberciti.biz/tips/linux-unix-download-accelerator.html

The program you are after is lftp. It supports sftp and parallel transfers using its pget command. It is available under Ubuntu (sudo apt-get install lftp) and you can read a review of it here:

http://www.cyberciti.biz/tips/linux-unix-download-accelerator.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文