Skip to content

How to retrieve the content of the Glacier Archive?

Karol Galanciak edited this page Feb 9, 2021 · 1 revision
client = Aws::Glacier::Client.new(credentials: Aws::Credentials.new(ENV.fetch("TARTARUS_AWS_KEY"), ENV.fetch("TARTARUS_AWS_SECRET")), region: ENV.fetch("TARTARUS_AWS_REGION"))

job  = client.initiate_job(account_id: "-", vault_name: ENV.fetch("TARTARUS_GLACIER_VAULT_NAME"), job_parameters: {  type: "archive-retrieval",  archive_id: archive_id_from_archive_registry_record })

# check status of the job
client.describe_job(account_id: "-", vault_name: ENV.fetch("TARTARUS_GLACIER_VAULT_NAME"), job_id: job.job_id)

# when ready
client.get_job_output(account_id: "-", vault_name: ENV.fetch("TARTARUS_GLACIER_VAULT_NAME"), job_id: job.job_id).body.string
Clone this wiki locally