

 **此页面仅适用于使用文件库和 2012 年原始 REST API 的 Amazon Glacier 服务的现有客户。**

如果您正在寻找归档存储解决方案，建议使用 Amazon S3 中的 Amazon Glacier 存储类别 S3 Glacier Instant Retrieval、S3 Glacier Flexible Retrieval 和 S3 Glacier Deep Archive。要了解有关这些存储选项的更多信息，请参阅 [Amazon Glacier 存储类别](https://www.amazonaws.cn/s3/storage-classes/glacier/)。

Amazon Glacier（最初基于保管库的独立服务）不再接受新客户。Amazon Glacier 是一项独立的服务 APIs ，拥有自己的服务，可将数据存储在文件库中，不同于亚马逊 S3 和 Amazon S3 Glacier 存储类别。在 Amazon Glacier 中，您现有的数据将确保安全，并且可以无限期地访问。无需进行迁移。对于低成本、长期的存档存储， Amazon 建议[使用 Amazon S3 Glacier 存储类别，这些存储类别](https://www.amazonaws.cn/s3/storage-classes/glacier/)基于S3存储桶 APIs、完全 Amazon Web Services 区域 可用性、更低的成本和 Amazon 服务集成，可提供卓越的客户体验。如果您希望加强功能，可以考虑使用我们的 [Amazon 将数据从 Amazon Glacier 文件库传输到 Amazon S3 Glacier 存储类别的解决方案指南](https://www.amazonaws.cn/solutions/guidance/data-transfer-from-amazon-s3-glacier-vaults-to-amazon-s3/)，迁移到 Amazon S3 Glacier 存储类别。

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 在 Amazon Glacier 中处理档案
<a name="working-with-archives"></a>

档案是您存储在文件库中的任何对象（例如，照片、视频或文档）。它是 Amazon Glacier（Amazon Glacier）的基本存储单位。每个档案都有唯一的 ID 和可选的描述。您在上传档案时，Amazon Glacier 返回包括档案 ID 的响应。此档案 ID 在存储档案的 Amazon 区域中是唯一的。以下是示例档案 ID。

```
TJgHcrOSfAkV6hdPqOATYfp_0ZaxL1pIBOc02iZ0gDPMr2ig-nhwd_PafstsdIf6HSrjHnP-3p6LCJClYytFT_CBhT9CwNxbRaM5MetS3I-GqwxI3Y8QtgbJbhEQPs0mJ3KExample
```

 存档长度 IDs 为 138 字节。在上传档案时，您可以提供可选的描述。您可以使用档案 ID（而不是档案描述）来检索档案。

 

**重要**  
Amazon Glacier 提供了一个管理控制台。您可以使用该控制台创建或删除文件库。但是，与 Amazon Glacier 的所有其他交互活动要求您使用 Amazon Command Line Interface （CLI）或编写代码。例如，要上传照片、视频和其他文档等数据，您必须直接使用 REST API Amazon CLI 或使用 Amazon 使用或编写代码来发出请求 SDKs。有关将 Amazon Glacier 与配合使用的更多信息 Amazon CLI，请访问[亚马逊冰川Amazon CLI 参考](https://docs.amazonaws.cn/cli/latest/reference/glacier/index.html)资料。要安装 Amazon CLI，请转至[Amazon Command Line Interface](https://www.amazonaws.cn/cli/)。

**Topics**
+ [Amazon Glacier 中的档案操作](#archive-operations-quick-intro)
+ [维护客户端档案元数据](#client-side-key-map-concept)
+ [在 Amazon Glacier 中上传档案](uploading-an-archive.md)
+ [在 Amazon Glacier 中下载档案](downloading-an-archive.md)
+ [删除 Amazon Glacier 中的档案](deleting-an-archive.md)

## Amazon Glacier 中的档案操作
<a name="archive-operations-quick-intro"></a>

Amazon Glacier 支持以下基本档案操作：上传、下载和删除。下载档案是一种异步操作。

### 在 Amazon Glacier 中上传档案
<a name="uploading-an-archive-quick-intro"></a>

您可以在单个操作中上传档案，也可以分段上传它。用于分段上传档案的 API 调用称为分段上传。有关更多信息，请参阅[在 Amazon Glacier 中上传档案](uploading-an-archive.md)。

 

**重要**  
Amazon Glacier 提供了一个管理控制台。您可以使用该控制台创建或删除文件库。但是，与 Amazon Glacier 的所有其他交互都需要您使用 Amazon Command Line Interface (CLI) 或编写代码。例如，要上传照片、视频和其他文档等数据，您必须直接使用 REST API Amazon CLI 或使用 Amazon 使用或编写代码来发出请求 SDKs。有关将 Amazon Glacier 与配合使用的更多信息 Amazon CLI，请访问[亚马逊冰川Amazon CLI 参考](https://docs.amazonaws.cn/cli/latest/reference/glacier/index.html)资料。要安装 Amazon CLI，请转至[Amazon Command Line Interface](https://www.amazonaws.cn/cli/)。

### 在 Amazon Glacier 中查找档案 ID
<a name="finding-an-archive-id-quick-intro"></a>

您可以通过下载包含下载档案的文件库的文件库清单来获取档案 ID。有关下载文件库清单的更多信息，请参阅[在 Amazon Glacier 中下载文件库清单](vault-inventory.md)。

### 在 Amazon Glacier 中下载档案
<a name="downloading-an-archive-quick-intro"></a>

下载档案是一种异步操作。您必须先启动下载特定档案的任务。收到任务请求后，Amazon Glacier 会准备要供下载的档案。任务完成后，您可以下载您的档案数据。由于任务具有异步性，因此，您可以请求 Amazon Glacier 在任务完成时向 Amazon Simple Notification Service（Amazon SNS）主题发送通知。您可以为每个任务请求指定 SNS 主题，或者将您的文件库配置为在特定事件发生时发送通知。有关下载档案的更多信息，请参阅[在 Amazon Glacier 中下载档案](downloading-an-archive.md)。

### 删除 Amazon Glacier 中的档案
<a name="deleting-an-archive-quick-intro"></a>

Amazon Glacier 提供了您可以用来一次删除一个档案的 API 调用。有关更多信息，请参阅[删除 Amazon Glacier 中的档案](deleting-an-archive.md)。

### 更新 Amazon Glacier 中的档案
<a name="updating-an-archive-quick-intro"></a>

上传档案后，您无法更新其内容或描述。可以更新档案内容或其描述的唯一方法是：删除档案，然后上传另一个档案。请注意，在您每次上传档案时，Amazon Glacier 都会向您返回一个唯一的档案 ID。

## 维护客户端档案元数据
<a name="client-side-key-map-concept"></a>

除了可选的档案描述以外，Amazon Glacier 不支持档案的任何附加元数据。在您上传档案时，Amazon Glacier 会分配一个 ID（字符的不透明序列），您无法从其推断有关档案的任何含意。您可能会在客户端维护有关档案的元数据。这些元数据可以包括档案名称以及有关档案的其他一些有意义的信息。

**注意**  
如果您是 Amazon Simple Storage Service（Amazon S3）客户，则会知道，将数据元上传到存储段时，可以为数据元分配一个数据元密钥，例如 `MyDocument.txt` 或 `SomePhoto.jpg`。在 Amazon Glacier 中，您无法为您上传的档案分配对象键。

如果您维护客户端档案元数据，请注意 Amazon Glacier 会维护一份文件库清单，其中包括档案 IDs 以及您在档案上传期间提供的任何描述。有时候，您可能会下载文件库清单，以协调您为档案元数据维护的客户端数据库中存在的任何问题。但是，Amazon Glacier 大约每天都会获取文件库清单。在您请求文件库清单时，Amazon Glacier 会返回它准备的上一份清单（时间点快照）。