备份s3桶的最佳实践

时间:2022-04-14 23:03:16

I want to do a daily backup for s3 buckets. I was wondering if anyone knew what was best practice?

我想为s3存储桶做每日备份。我想知道是否有人知道什么是最佳做法?

I was thinking of using a lambda function to copy contents from one s3 bucket to another as the s3 bucket is updated. But that won't mitigate against an s3 failure. How do I copy contents from one s3 bucket to another Amazon service like Glacier using lamda? What's the best practice here for backing up s3 buckets?

我正在考虑使用lambda函数在更新s3存储桶时将内容从一个s3存储桶复制到另一个存储桶。但这不会减轻s3失败。如何使用lamda将内容从一个s3存储桶复制到另一个像Glacier这样的亚马逊服务?备份s3存储桶的最佳做法是什么?

NOTE: I want to do a backup not archive (where content is deleted afterward)

注意:我想进行备份而不是归档(之后删除内容)

1 个解决方案

#1


1  

Look into S3 cross-region replication to keep a backup copy of everything in another S3 bucket in another region. Note that you can even have the destination bucket be in a different AWS Account, so that it is safe even if your primary S3 account is hacked.

查看S3跨区域复制,以保留另一个区域中另一个S3存储桶中所有内容的备份副本。请注意,您甚至可以将目标存储桶放在不同的AWS账户中,这样即使您的主S3账户被黑客攻击也是安全的。

Note that a combination of Cross Region Replication and S3 Object Versioning (which is required for replication) will allow you to keep old versions of your files available even if they are deleted from the source bucket.

请注意,跨区域复制和S3对象版本控制(复制所需)的组合将允许您保留旧版本的文件,即使它们已从源存储桶中删除。

Then look into S3 lifecycle management to transition objects to Glacier to save storage costs.

然后研究S3生命周期管理,将对象转换为Glacier以节省存储成本。

#1


1  

Look into S3 cross-region replication to keep a backup copy of everything in another S3 bucket in another region. Note that you can even have the destination bucket be in a different AWS Account, so that it is safe even if your primary S3 account is hacked.

查看S3跨区域复制,以保留另一个区域中另一个S3存储桶中所有内容的备份副本。请注意,您甚至可以将目标存储桶放在不同的AWS账户中,这样即使您的主S3账户被黑客攻击也是安全的。

Note that a combination of Cross Region Replication and S3 Object Versioning (which is required for replication) will allow you to keep old versions of your files available even if they are deleted from the source bucket.

请注意,跨区域复制和S3对象版本控制(复制所需)的组合将允许您保留旧版本的文件,即使它们已从源存储桶中删除。

Then look into S3 lifecycle management to transition objects to Glacier to save storage costs.

然后研究S3生命周期管理,将对象转换为Glacier以节省存储成本。