s3-tar icon indicating copy to clipboard operation
s3-tar copied to clipboard

How to restore metadata?

Open cmavromichalis opened this issue 3 years ago • 1 comments

This is a question and not an issue, I am having trouble so hopefully it's not something obvious I am missing.

I don't see a way to make a "snapshot" of an entire S3 bucket natively in AWS; to save it all as is at a specific point of time. I'd like to use s3-tar as a way to make a "snapshot"; to tar an entire S3 bucket periodically and create versions of the S3 bucket.

If I need to restore the bucket from a tar; how does one restore the metadata to the objects? There are 1000s of small files with metadata

Thank you

cmavromichalis avatar Mar 08 '21 23:03 cmavromichalis

If you set the flag to save the metadata, then the archive will contain files that ends with .metadata.json for each file. This tool is not designed to re-expand the data back into s3, so you will need your own script for that. But when you upload a file back to s3 you can also add the metadata to the file usually in the same command as uploading.

xtream1101 avatar Mar 18 '21 17:03 xtream1101