[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Duplicity-talk] Restoring from Glacier to S3
From: |
Ed Blackman |
Subject: |
Re: [Duplicity-talk] Restoring from Glacier to S3 |
Date: |
Tue, 4 Aug 2015 14:20:22 -0400 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Thu, Jul 30, 2015 at 09:33:09AM +0200, Benjamin Henrion wrote:
So other problem: some duplicity files are in glacier, some others are
in standard.
When I try to do a recursive restore with s3cmd:
s3cmd restore --recursive s3://mydatastore/mymachine/
It fails on standard files which of course are not in glacier:
ERROR: S3 error: Restore is not allowed, as object's storage class is
not GLACIER
Any idea how to solve that?
This is wandering off topic, so I won't follow up. Email me if you have
questions.
I don't have any Glacier objects I need to restore, so I can't
experiment to determine whether s3cmd aborts the restore when it
encounters a STANDARD class file, or whether it just fails to restore
that file (because it's not in Glacier) but does restore the others.
If the latter, the Glacier files should have been restored. If the
former, you'll need a command that only restores the GLACIER class
objects.
Here's something that I whipped up. Note that I didn't test the
restore, see above. <grin> It uses the aws command line utility, which
offers lower-level access to S3 (and other AWS objects) at the cost of
some complexity that s3cmd hides from you.
b=examplebucket # replace with your bucket name
aws s3api list-objects --bucket "$b" \
--query "Contents[?StorageClass=='GLACIER'].{Key: Key}" --output text |
while read name; do
echo aws s3api restore-object --bucket "$b" --key "$name"
done
Remove the "echo" once you're satisfied that it's going to do what you
intend. I'd suggest running at least one of the restore-object commands
manually to make sure it works like I think it does.
--
Ed Blackman
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Duplicity-talk] Restoring from Glacier to S3,
Ed Blackman <=