备份S3存储桶,保持链接一致。

huangapple go评论119阅读模式
英文:

Backup S3 bucket with identical links

问题

我有一个包含10,000多个问题的题库应用程序。

这些问题是文本和图片的组合(存储在数据库中),图片作为链接嵌入在Amazon S3上。

出于安全考虑,我想弄清楚是否可以备份整个S3存储桶,然后在之后还原它,保持完全相同的链接

有相关经验吗?

英文:

I have a Question Bank application with +10k questions.

The questions are a combination of text (stored within a database) and images (hosted on Amazon S3). The images are embedded as links through a admin panel.

For security purposes, I want to figure out if I can back-up the entire S3 bucket and later restore it with the same identical links.

Any experience with this?

答案1

得分: 1

我假设您的用户是通过Amazon S3 URL访问图像的。

该URL由存储桶名称和对象的键(文件名)组成。要提供具有“完全相同链接”的文件,只需将其放入相同的存储桶并赋予相同的键。

请注意,Amazon S3中存储的数据会在多个可用性区域之间复制。因此,通常不必备份数据以增强弹性。但是,以防某人意外或恶意删除对象,备份可能是明智之举。 (启用版本控制也可以防范这种情况。)

如果您确实希望“备份整个存储桶”,一种选择是使用同区域复制,它将自动在存储桶之间复制对象。这需要激活版本控制。

英文:

I presume that your users are accessing the images via an Amazon S3 URL.

The URL consists of the bucket name and the Key (filename) of the object. To provide a file with the "same identical link" simply means putting it in the same bucket and giving it the same Key.

Please note that data stored in Amazon S3 is replicated between multiple Availability Zones. Therefore, it is typically not necessary to backup data for resilience purposes. However, it can be wise to backup in case somebody accidentally or maliciously deletes the objects. (Turning on Versioning could also be a way to safeguard against such cases.)

If you do wish to "backup an entire bucket", one option is to use Same-Region replication, which will automatically replicate objects between buckets. It requires that Versioning is activated.

huangapple
  • 本文由 发表于 2020年1月6日 14:45:09
  • 转载请务必保留本文链接:https://go.coder-hub.com/59607775.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定