简体   繁体   中英

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"

Now if I am running my app today for backing up the fileName "abc.txt", it will store that as the pattern specified.

Let's say tomorrow "abc.txt" is updated and the updated file now needs to be backed up on 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?

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 . 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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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