thenickdude / snap-to-s3

Upload EBS volume snapshots to Amazon S3/Glacier
Other
114 stars 24 forks source link

Validation fails on unencrypted snapshot #16

Closed dsl101 closed 3 years ago

dsl101 commented 3 years ago

I haven't (knowingly) encrypted the snapshots (no --gpg... options used), but validation is failing like so:

Error: "s3://XXX/vol-YYY/2016-05-17T14:17:51+00:00 snap-ZZZ - Pre SSD upgrade.tar.lz4.gpg" should exist, but wasn't readable/found! NotFound: null

And I can see there is no such object in S3. Should that have been created along with the .tar.lz4 object anyway?

thenickdude commented 3 years ago

snap-to-s3 avoids requiring the ListBucket permission by checking multiple possible files with GetObject. If it doesn't find any of the ones it is looking for it just reports the last error encountered, which happens to be the encrypted file.

Double check that your instance role grants GetObject permissions for the backup bucket.

dsl101 commented 3 years ago

Yes, the roles are correct, but I was blind-sided by the other issue I raised, thinking that the path / object names with slashes were part of the problem. So I picked a different snapshot to test against which had no slashes—but that one had moved to deep storage, so was in fact unreadable! Gah.

Anyway, all working fine now. And btw, thanks for snap-to-s3 and the quick responses :).