Question

Amazon Glacier does not have the concept of filepaths. However when I upload files to glacier via client tools like Cloudberry then my uploads do have a path structure.

If I am programmatically uploading an archive to Amazon Glacier, how can I upload it so it has a filepath and filename in Cloudberry? I think I may need add something to the 'x-amz-archive-description' field here http://docs.aws.amazon.com/amazonglacier/latest/dev/api-archive-post.html, but I do not know how to format it.

I am using the Amazon Javascript SDK: http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/examples.html. I think I've been able to upload archives fine, though I haven't been able to see them in Cloudberry yet.

UPDATE: After getting it working, I put the code I was using here in case a sample is needed: https://github.com/fschwiet/mysql-glacier-backup

Was it helpful?

Solution

Our Glacier archive description metadata is a simple JSON with the following fields:

  • "Path": the full path of the source file. E.g., "c:\myfolder\myfile.txt" for file copied from local disk or "mybucket/myfolder/myfile.txt" for files copied from cloud storage like Amazon S3. The path is UTF7-encoded.
  • "UTCDateModified": ISO8601 utc date without milliseconds (format: "yyyyMMddTHHmmssZ"). This is modification date of the original file (not the archive creation date).
  • "Flags": integer flags value. 1 - compressed, 2 - encrypted.

Thanks, Andy

OTHER TIPS

I've been zipping the tree up (for ease of restore) and storing all the tree info in the archive. Thus photos_2012.zip or whatever. The long list of files just wasn't working for me from an ease-of-checking-things-were-cactually-backed-up perspective.

It's more costly to restore, because I'll have to pull a whole tree down, but given that my goal is never to need this archive, I'm OK with that.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top