mc ilm restore

The mc ilm restore command creates a temporary copy of an object archived on a remotetier. The copy automatically expires after 1 day by default.

Syntax

Use this command to allow applications to access a tiered object through the AIStor deployment (e.g. “hot tier”). The archived object remains on the remote tier, while the temporary copy becomes HEAD for that object.

Use mc stat to display whether a restored object reads from the local temporary copy or the remote tier. Objects currently in the process of restoration from the remote tier show a status of Ongoing : true.

Parameters

ALIAS

Required

The AIStor alias, bucket, and path to the archived object to restore.

mc ilm restore myminio/mybucket/object.txt

--days

Optional

The number of days after which AIStor expires the restored copy of the archived object.

--enc-c

Optional

Encrypt or decrypt objects using server-side SSE-C encryption with client-managed keys.

AIStor strongly recommends against using SSE-C encryption in production workloads.

The parameter accepts a key-value pair formatted as KEY=VALUE

  • KEY - The full path to the object as alias/bucket/path/object.ext. You can specify only the top-level path to use a single encryption key for all operations in that path.

  • VALUE - Specify either a 32-byte RawBase64-encoded key or a 64-byte hex-encoded key for use with SSE-C encryption.

    Raw Base64 encoding rejects =-padded keys. Omit the padding or use a Base64 encoder that supports RAW formatting.

For example:

# RawBase64-Encoded string "mybucket32byteencryptionkeyssec"
--enc-c "myminio/mybucket/prefix/object.obj=bXlidWNrZXQzMmJ5dGVlbmNyeXB0aW9ua2V5c3NlYwo"

You can specify multiple encryption keys by repeating the parameter.

Specify the path to a prefix to apply encryption to all matching objects at that path:

--enc-c "myminio/mybucket/prefix/=bXlidWNrZXQzMmJ5dGVlbmNyeXB0aW9ua2V5c3NlYwo"

--recursive

Alias: -r

Optional

Restores all objects under the specified prefix.

--versions

Optional

Restores all versions of the object on the remote tier.

--version-id

Alias: --vid

Optional

Restores the specified version of the object on the remote tier.

Global Flags

This command supports any of the global flags.

Examples

Restore an Archived Object

The following command restores an object archived to a remote tier:

mc ilm restore myminio/mybucket/object.txt

Restore a Specific Archived Object Version

The following command restore a specific object version archived to a remote tier:

mc ilm restore --vid "VERSIONID" myminio/mybucket/object.txt

Restore All Archived Objects at a Bucket Prefix

The following command restores all objects archived under a specified prefix on the remote tier:

mc ilm restore --recursive myminio/mybucket/data/

Behavior

Restored Objects Expire Automatically

AIStor automatically expires the restored object copy after the specified number of days (Default: 1 day).

Restored Objects Become HEAD

The restored object copy becomes HEAD for that object namespace regardless of it’s versioning history. This can result in applications returning “stale” data while the local copy exists.

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with AIStor and AWS S3 for expected functionality and behavior.

AIStor provides no guarantees for other S3-compatible services, As their S3 API implementation is unknown and therefore unsupported.

While mc commands may work as documented, any such usage is at your own risk.