如何使用 SCP 和 AWS 共享远程 Ceph (S3) 和远程标准文件系统的数据?

问题描述 投票:0回答:1

我需要在机器 A (linux 文件系统) 和机器 B (Ceph/S3 对象文件系统) 之间从机器 C (我唯一可以控制的机器) 传输数据。在机器 C 上,我安装了 aws cli 进行传输。

我已经弄清楚如何从A转移到B:

scp user@A:/path/to/file >(aws s3 cp - s3://s3uri/)

但是从B转到A我很困惑。我尝试了很多方法都没有成功。命令

aws s3 cp s3://s3uri/filename.txt >(scp - user@A:/path/to/file)
给了我这个错误:

-: No such file or directory
download failed: s3://s3uri/filename.txt to ../../dev/fd/63 [Errno 32] Broken pipe

这种写作风格似乎不允许使用连字符

命令

scp <(aws s3 cp s3://s3uri/filename.txt -) user@A:/path/to/file)
给了我这个错误:

/dev/fd/63: not a regular file
download failed: s3://s3uri/filename.txt to - [Errno 32] Broken pipe

以前有人这样做过吗?

感谢您的帮助 蒂埃里

aws-cli scp ceph
1个回答
0
投票

也许你可以使用 ssh 来解决:

aws s3 cp ... >(cat) | ssh [serveur] 'cat > file.txt'

你只需要找到一种方法来避免aws在新文件末尾写入“N/N bytes Transfer... 1 file...”

© www.soinside.com 2019 - 2024. All rights reserved.