Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Download all objects from a S3 bucket, including glacier restored

I have set a number of files for restore from glacier to S3 and I want to download it all – the whole bucket.

When I browse the s3 bucket from the web console, I don’t see the glacier restored items (unless I show the version).

Is there a way to download all the bucket files to the local drive, including glacier restored ones?

Edit:

I ran

s3cmd sync s3://bucketname .

got only the non-glacier restored ones.

like image 570
Quintin Par Avatar asked Jul 31 '18 01:07

Quintin Par


People also ask

How do I download an entire S3 bucket?

To download an entire bucket to your local file system, use the AWS CLI sync command, passing it the s3 bucket as a source and a directory on your file system as a destination, e.g. aws s3 sync s3://YOUR_BUCKET . . The sync command recursively copies the contents of the source to the destination.

How do I download data from S3 Glacier?

However, you cannot download archives from S3 Glacier by using the management console. To download data, such as photos, videos, and other documents, you must either use the AWS Command Line Interface (AWS CLI) or write code to make requests, by using either the REST API directly or by using the AWS SDKs.

How do I retrieve files from Glacier deep archive?

In the Objects list, select the object or objects that you want to restore, choose Actions, and then choose Initiate restore. If you're restoring from S3 Glacier Flexible Retrieval or S3 Glacier Deep Archive, enter the number of days that you want your archived data to be accessible in the Initiate restore dialog box.


1 Answers

You can use below command to sync s3 bucket including the restored files:

aws s3 sync s3://bucketname <local directory or .> --force-glacier-transfer
like image 191
Rodel Avatar answered Oct 08 '22 06:10

Rodel