AWS跨区域复制到多个区域?

编程入门 行业动态 更新时间:2024-10-27 23:29:06
本文介绍了AWS跨区域复制到多个区域?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在尝试设置跨区域复制,以便将我的原始文件复制到两个不同的区域.现在,我只能将其复制到另一个区域.

I am trying to set up cross region replication so that my original file will be replicated to two different regions. Right now, I can only get it to replicate to one other region.

例如,我的文件使用的是美国标准.上传文件后,该文件将从美国标准复制到美国西部2.我也希望将该文件复制到美国西部1.

For example, my files are on US Standard. When a file is uploaded it is replicated from US Standard to US West 2. I would also like for that file to be replicated to US West 1.

有没有办法做到这一点?

Is there a way to do this?

推荐答案

似乎Amazon S3中的跨区域复制无法链接.因此,它不能用于从存储区A复制到存储区B到存储区C.

It appears the Cross-Region Replication in Amazon S3 cannot be chained. Therefore, it cannot be used to replicate from Bucket A to Bucket B to Bucket C.

一种替代方法是使用 AWS命令行界面(CLI)在存储桶之间进行同步,例如:

An alternative would be to use the AWS Command-Line Interface (CLI) to synchronise between buckets, eg:

aws s3 sync s3://bucket1 s3://bucket2 aws s3 sync s3://bucket1 s3://bucket3

sync 命令仅复制新文件和更改的文件.数据直接在Amazon S3存储桶之间进行传输,即使它们位于不同的区域-也不会将数据下载/上传到您自己的计算机上.

The sync command only copies new and changed files. Data is transferred directly between the Amazon S3 buckets, even if they are in different regions -- no data is downloaded/uploaded to your own computer.

因此,将这些命令放在 cron 作业或计划任务"中,使其每小时运行一次,存储桶将很好地复制!

So, put these commands in a cron job or a Scheduled Task to run once an hour and the buckets will nicely replicate!

请参阅: AWS CLI S3同步命令文档

更多推荐

AWS跨区域复制到多个区域?

本文发布于:2023-11-06 14:53:29,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1563995.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:多个   区域   AWS

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!