Creating Archive Containers

Not Oracle Cloud at Customer This topic does not apply to Oracle Cloud at Customer.

A container for which the X-Storage-Class metadata field is set to Archive is called an Archive container. You can use Archive containers to store data that won't be accessed for a while or that will be accessed infrequently. Any user with the Service Administrator role can create Archive containers.
You can create Archive containers by using the following interfaces:
Interface Resources

Web Console

See Creating an Archive Container Using the Web Console.

RESTful API

See:

File Transfer Manager API

See createContainer in Java API Reference for Oracle Cloud Infrastructure Object Storage Classic File Transfer Manager.

Note:

  • You can set X-Storage-Class only when creating a new container. After you set X-Storage-Class, you cannot change it.
  • You cannot create an Archive container by using the Java API.

Features Not Supported for Archive Containers

The following features are not supported for an Archive container:
  • Bulk-creating objects
  • Bulk-deleting objects
  • Scheduling automatic deletion of objects by using the X-Delete-At and X-Delete-After headers
  • Georeplication
  • Setting a container-specific replication policy

Creating an Archive Container Using the Web Console

  1. Sign in to the Oracle Cloud Infrastructure Object Storage Classic console.
  2. Click Create Container.

    The Create Container dialog is displayed.

  3. Enter a name for the container.

    Note:

    Ensure that the container name complies with the input restrictions mentioned in Character Restrictions.
  4. Select Archive in the Storage Class field.
  5. Click Create.

    The container is created and displayed in the console.

Creating an Archive Container Using the REST API

cURL Command Syntax

curl -v -X PUT \
     -H "X-Auth-Token: token" \
     -H "X-Storage-Class: Archive" \
     accountURL/containerName

Note:

When you send a REST API request to Oracle Cloud Infrastructure Object Storage Classic, all non-ASCII characters in container names, object names and metadata values must be URL-encoded. For example, my container should be encoded as my%20container, where %20 is the HTML encoding for the space character. Similarly, my Über Container should be encoded as my%20%C3%9Cber%20Container, where %20 represents the space character and %C3%9C is the Ü character.

HTTP Response Codes

cURL Command Examples

Sample Cloud account with the following details:
  • Account name: acme
  • REST Endpoint URL: https://acme.storage.oraclecloud.com/v1/Storage-acme
  • REST Endpoint (Permanent) URL: https://storage-7b16fede61e1417ab83eb52e06f0e365.storage.oraclecloud.com/v1/Storage-7b16fede61e1417ab83eb52e06f0e365

    Note:

    The REST Endpoint (Permanent) URL is displayed for the accounts created after November 2017.
  • Using the REST Endpoint URL obtained from the REST Endpoint field:
    curl -v -X PUT \
         -H "X-Auth-Token: AUTH_tkb4fdf39c92e9f62cca9b7c196f8b6e6b" \
         -H "X-Storage-Class: Archive" 
         https://acme.storage.oraclecloud.com/v1/Storage-acme/firstArchiveContainer
    

    The following is an example of the output of this command:

    > PUT /v1/Storage-acme/firstArchiveContainer HTTP/1.1
    > User-Agent: curl/7.29.0
    > Host: acme.storage.oraclecloud.com:443 
    > Accept: */*
    > X-Auth-Token: AUTH_tk1ff0554c1fefff9209696d63553722fd
    > X-Storage-Class: Archive
    >
    < HTTP/1.1 201 Created
    < X-Trans-Id: tx1d8e9739df4a47bb847e0-005582875bga
    < Date: Thu, 18 Jun 2015 08:54:51 GMT
    < Content-Type: text/html;charset=UTF-8
    < Content-Length: 0
    <
    
  • Using the Service Permanent REST Endpoint URL obtained from the REST Endpoint (Permanent) field:

    Note:

    This cURL command example applies to the accounts created after November 2017.
    curl -v -X PUT \
         -H "X-Auth-Token: AUTH_tkb4fdf39c92e9f62cca9b7c196f8b6e6b" \
         -H "X-Storage-Class: Archive" 
         https://storage-7b16fede61e1417ab83eb52e06f0e365.storage.oraclecloud.com/v1/Storage-7b16fede61e1417ab83eb52e06f0e365/firstArchiveContainer
    

    The following is an example of the output of this command:

    > PUT /v1/Storage-7b16fede61e1417ab83eb52e06f0e365/firstArchiveContainer HTTP/1.1
    > User-Agent: curl/7.29.0
    > Host: storage-7b16fede61e1417ab83eb52e06f0e365.storage.oraclecloud.com:443 
    > Accept: */*
    > X-Auth-Token: AUTH_tk1ff0554c1fefff9209696d63553722fd
    > X-Storage-Class: Archive
    >
    < HTTP/1.1 201 Created
    < X-Trans-Id: tx1d8e9739df4a47bb847e0-005582875bga
    < Date: Thu, 18 Jun 2015 08:54:51 GMT
    < Content-Type: text/html;charset=UTF-8
    < Content-Length: 0
    <
    

For information about getting details of an Archive container, see Getting Container Metadata.

For creating objects in an Archive container, see Creating Objects.