amazon-s3 - 如何解决文件还原后 AWS S3 副本存储桶中的不一致问题?

标签 amazon-s3 replication failover

我已从源存储桶中删除了文件。源和副本是同步的,都有删除标记。我删除源存储桶中的删除标记 以恢复文件。但该文件在副本中被删除(具有删除标记)。这是设计使然:

If a DELETE request specifies a particular object version ID to delete, Amazon S3 deletes that object version in the source bucket, but it does not replicate the deletion in the destination bucket (in other words, it does not delete the same object version from the destination bucket). This behavior protects data from malicious deletions. https://docs.aws.amazon.com/AmazonS3/latest/dev/crr-what-is-isnot-replicated.html

我需要一个一致的副本来进行故障转移。如何防止副本不一致?

最佳答案

我看到了保存一致性的唯一方法:

切勿删除对象版本,包括删除标记

重新上传对象(创建新版本)以恢复它而不是删除删除标记

关于amazon-s3 - 如何解决文件还原后 AWS S3 副本存储桶中的不一致问题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48929578/