mc ilm restore
Syntax
The mc ilm restore command creates a temporary local copy of an object archived on a remote tier. The temporary copy expires after 1 day by default.
Use this command to let applications read a transitioned object from local storage on the SILO deployment. The transitioned data remains on the remote tier while the temporary local copy serves read requests for the restored version until the restore period expires.
Added: mc
RELEASE.2023-04-12T02-21-51Z
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 myminio MinIO deployment:
The command has the following syntax:
- 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
mc-cmd
Required
The MinIO alias, bucket, and path to the archived object to restore.
--days
mc-cmd
Optional
The number of days after which MinIO expires the restored copy of the archived object.
--enc-c
mc-cmd
Optional
Encrypt or decrypt objects using server-side SSE-C encryption with client-managed keys.
The parameter accepts a key-value pair formatted as KEY=VALUE:
| Component | Description |
|---|---|
KEY |
The full path to the object as alias/bucket/path/object.ext. Specify only the top-level path to use one encryption key for all operations under that path. |
VALUE |
Either a 32-byte RawBase64-encoded key or a 64-byte hex-encoded key for SSE-C encryption. Raw Base64 encoding rejects =-padded keys; omit padding or use a RAW Base64 encoder. |
For example:
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:
Note
MinIO strongly recommends against using SSE-C encryption in production workloads. Use SSE-KMS via the --enc-kms or SSE-S3 via --enc-s3 parameters instead.
--recursive, r
mc-cmd
Optional
Restores all objects under the specified prefix.
--versions
mc-cmd
Optional
Restores all versions of the object on the remote tier.
--version-id, vid
mc-cmd
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:
Restore a Specific Archived Object Version
The following command restores a specific object version archived to a remote tier:
Restore All Archived Objects at a Bucket Prefix
The following command restores all objects archived under a specified prefix on the remote tier:
Behavior
Restored Objects Expire Automatically
SILO automatically expires the restored local copy after the specified number of days (default: 1 day). In SILO 20261109, expiring a restored copy removes only the temporary local cache while keeping the object version and its remote-tier data intact (#281).
Two-Phase In-Place Version Restore
Starting in SILO 20261109, native restore (POST ?restore, commit 86dc6ee2e) runs in two phases; see Native Restore in Two Phases for design details:
- In-place version restoration: SILO restores the exact addressed version in place without changing version ordering or creating a new
HEADversion. Multi-pool restores no longer hang or remain stuck in progress (#289). - Two-phase locking: Phase 1 downloads and stages the remote-tier data outside the object write lock so concurrent
GET,HEAD, andPUTrequests on the key do not wait for the download. Phase 2 acquires a short object lock and validates attempt ownership and version metadata before publishing the restored copy (#284). - Fast failure cleanup: If a restore fails or is canceled, the server returns immediately and attempts marker cleanup for
100 msbefore switching to bounded background retries, instead of waiting up to one minute for the object lock. - Rolling-upgrade gate: During a mixed-version rolling upgrade, upgraded nodes return
503 Service UnavailabletoPOST ?restorewhile any peer runs an older version or is unreachable. Pause new restores until all nodes runSILO 20261109.
S3 Compatibility
SILO is the supported server for PGSTY mcli; compatibility with upstream MinIO and other S3 services is best effort.