简体   繁体   English

覆盖 S3 存储桶上的文件

[英]Overwrite a file on S3 bucket

I am developing a feature where we need to back up our files on S3 bucket with the key pattern as "tmp/yyyy-mm-dd.file_type.fileName"我正在开发一个功能,我们需要在 S3 存储桶上备份我们的文件,密钥模式为“tmp/yyyy-mm-dd.file_type.fileName”

Now if I am running my app today for backing up the fileName "abc.txt", it will store that as the pattern specified.现在,如果我今天运行我的应用程序来备份文件名“abc.txt”,它会将其存储为指定的模式。

Let's say tomorrow "abc.txt" is updated and the updated file now needs to be backed up on S3.假设明天“abc.txt”已更新,更新后的文件现在需要在 S3 上进行备份。 Thus, it will be pushed with a different timestamp but with the same fileName present in key of our bucket.因此,它将使用不同的时间戳推送,但在我们的存储桶的键中存在相同的文件名。

So what should be done such that there is no redundancy on S3 bucket and the file should be overwritten?那么应该怎么做才能使 S3 存储桶上没有冗余并且应该覆盖文件呢?

It appears that you wish to implement de-duplication so that the same file is not stored multiple times.您似乎希望实施重复数据删除,以便不会多次存储同一文件。

Amazon S3 does not provide de-duplication as a feature . Amazon S3 不提供重复数据删除功能 Your software would need to recognize such duplication and implement this capability itself.您的软件需要识别此类重复并自行实现此功能。

Alternatively, you might want to use commercial backup software that already has this capability in-built.或者,您可能希望使用已内置此功能的商业备份软件

Example: MSP36 Backup (formerly CloudBerry Backup)示例: MSP36 备份(以前称为 CloudBerry 备份)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM