5
votes

I'm actually using python boto to store data on my glacier's vault and launch retrieve jov and inventory job.

This works quite well.

But i didn't find any example about the method to use to download an archive from glacier?

I had launch retrieve jov and inventory job and got request id 4 hours later etc, but howto grab my archive by using boto ?

Thanks for your help !

1

1 Answers

5
votes

To retrieve your inventory, you could do something like this:

import boto.glacier

c = boto.glacier.connect_to_region('us-east-1')
vault = c.get_vault('myvault')
job = vault.get_job('<your job id>')
response = job.get_output()
print response.read()

It's a bit confusing because the call to get_output() returns a dict-like object but that object has a read method that you can use to retrieve the data associated with the response.