← Back to team overview

duplicity-team team mailing list archive

Re: [Question #656947]: restoring metadata from amazon glacier

 

Question #656947 on Duplicity changed:
https://answers.launchpad.net/duplicity/+question/656947

edso proposed the following answer:
On 25.08.2017 15:47, Martin wrote:
> Question #656947 on Duplicity changed:
> https://answers.launchpad.net/duplicity/+question/656947
> 
> Martin posted a new comment:
> Also I have found the following problem:
> _boto_single assumes that objects in class "GLACIER" cannot be downloaded ("if key.storage_class == "GLACIER":").
> This is not true.
> http://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html states:
>         After you receive a temporary copy of the restored object, the object's storage class remains GLACIER 
>         (a GET or HEAD request will return GLACIER as the storage class). 
> So it is not a good idea to force objects back to S3.
> 
> The correct way for _boto_single.pre_process_download to do it:
> 
> if key.storage_class == "GLACIER":
>   if key.ongoing_restore: wait or ignore
>   else if key.expiry_date: restore finished, temp copy available
>   else key.restore(days=2)
> 
>  See also http://boto.cloudhackers.com/en/latest/s3_tut.html
> 

good catch. again, you are welcome to fix those. i, unfortunately do not
use s3 nor have i the need to, but would be willing to help you get your
changes committed ;)

..ede/duply.net

-- 
You received this question notification because your team duplicity-team
is an answer contact for Duplicity.