Skip to content

Retrieve archive from S3 Glacier

0

Hi, Question for retrieving archive from S3. In the command line below, I need to specify the AWS vault name. But what if the file that I'm trying to retrieve is in a subfolder in my Vault? How this command line applies when the archive to retrieve is under a subfolder in my vault? When using this command :aws glacier initiate-job --vault-name awsexamplevault --account-id 111122223333 --job-parameters="{"Type":"archive-retrieval","ArchiveId":"*** archiveId ***"}"

asked 8 months ago131 views

1 Answer
0

In Amazon S3 Glacier, vaults don't have a folder or subfolder structure like you might be familiar with in Amazon S3. Vaults are flat containers that store archives, and each archive is identified by a unique Archive ID rather than a file path or folder hierarchy.

When you upload data to a Glacier vault, it becomes an archive with a unique identifier (Archive ID), regardless of any original folder structure. The vault itself doesn't maintain subfolders - it simply contains archives.

To retrieve an archive from a vault, you only need two pieces of information:

  1. The vault name
  2. The Archive ID of the specific archive you want to retrieve

The command you're using is correct as-is. You don't need to specify any subfolder path because that concept doesn't exist in Glacier vaults. Simply use the vault name and the Archive ID of the archive you want to retrieve, and the initiate-job command will work regardless of what folder structure the file may have had before it was archived.

If you need to find the Archive ID of a specific file, you would first need to retrieve a vault inventory, which lists all archives in the vault along with their Archive IDs and any descriptions you may have provided during upload.
Sources
Downloading an Archive in Amazon Glacier Using the AWS CLI - Amazon Glacier
Retrieving Amazon Glacier Archives - Amazon Glacier

answered 8 months ago

EXPERT

reviewed 8 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.