mc ilm restore
The mc ilm restore command creates a temporary copy of an object archived on a remote tier.
The copy automatically expires after 1 day by default.
Syntax
Use this command to allow applications to access a tiered object through the MinIO AIStor deployment (that is, the “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.
The following command restores a copy of a transitioned object from the remote tier back to the myaistor MinIO AIStor deployment:
mc ilm restore myaistor/mybucket/object.txtThe command has the following syntax:
mc [GLOBALFLAGS] ilm restore \
[--days "int" ] \
[--recursive] \
[--vid "string"] \
[--versions] \
[--enc-c "string"] \
ALIAS- Brackets
[]indicate optional parameters. - Parameters sharing a line are mutually dependent.
- Parameters separated using the pipe
|operator are mutually exclusive.
Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.
Parameters
ALIAS
Required
The MinIO AIStor alias, bucket, and path to the archived object to restore.
mc ilm restore myaistor/mybucket/object.txt--days
Optional
The number of days after which MinIO 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.
MinIO 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 asalias/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 "mybucket32byteencryptionkeyssec1"
--enc-c "myaistor/mybucket/prefix/object.obj=bXlidWNrZXQzMmJ5dGVlbmNyeXB0aW9ua2V5c3NlYzE"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 "myaistor/mybucket/prefix/=bXlidWNrZXQzMmJ5dGVlbmNyeXB0aW9ua2V5c3NlYzE"--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 myaistor/mybucket/object.txtRestore a specific archived object version
The following command restore a specific object version archived to a remote tier:
mc ilm restore --vid "VERSIONID" myaistor/mybucket/object.txtRestore 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 myaistor/mybucket/data/Behavior
Restored objects expire automatically
MinIO AIStor automatically expires the restored object copy after the specified number of days (Default: 1 day).
Restored objects keep their version
The restored object copy keeps the version ID and modification time of the version you restore.
Restoring a noncurrent version does not make it the current version.
To read a restored noncurrent version, specify its version ID, for example with mc cat --version-id.
S3 compatibility
The mc command-line tool is built for compatibility with the AWS S3 API and is tested with MinIO AIStor and AWS S3 for expected functionality and behavior.
MinIO 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.