[英]AWS cross region replication to multiple regions?
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.
现在,我只能将其复制到另一个区域。
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.
上载文件后,会将其从美国标准复制到美国西部2。我也希望将该文件复制到美国西部1。
Is there a way to do this? 有没有办法做到这一点?
It appears the Cross-Region Replication in Amazon S3 cannot be chained . 看来Amazon S3中的跨区域复制无法链接 。 Therefore, it cannot be used to replicate from Bucket A to Bucket B to Bucket C.
因此,它不能用于从存储区A复制到存储区B到存储区C。
An alternative would be to use the AWS Command-Line Interface (CLI) to synchronise between buckets, eg: 一种替代方法是使用AWS命令行界面(CLI)在存储桶之间进行同步,例如:
aws s3 sync s3://bucket1 s3://bucket2
aws s3 sync s3://bucket1 s3://bucket3
The sync
command only copies new and changed files. sync
命令仅复制新文件和更改的文件。 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. 数据直接在Amazon S3存储桶之间进行传输,即使它们位于不同的区域内-也不会将数据下载/上传到您自己的计算机上。
So, put these commands in a cron
job or a Scheduled Task to run once an hour and the buckets will nicely replicate! 因此,将这些命令放在
cron
作业或“计划任务”中,使其每小时运行一次,存储桶将很好地复制!
See: AWS CLI S3 sync command documentation 请参阅: AWS CLI S3同步命令文档
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.