- Adds landing pages for all two-word `mc` commands - Nests three+ word commands under appropriate two-word commands - Updates MinIO Client doc - Uses description from each command to populate list of subcommand descriptions - Modifies toctree for MinIO Client doc and each command/subcommand to improve left nav experienc Closes #710
6.6 KiB
mc retention info
minio
Table of Contents
mc retention info
Syntax
The mc retention info
command configures the Write-Once Read-Many (WORM)
locking <minio-object-locking>
settings for an object or
object(s) in a bucket. You can also set the default object lock settings
for a bucket, where all objects without explicit object lock settings
inherit the bucket default.
To lock an object under legal hold <minio-object-locking-legalhold>
, use
mc legalhold set
.
mc retention info
requires that the specified bucket has object locking enabled.
You can only enable object locking at bucket creation.
See mc mb --with-lock
for documentation on creating
buckets with object locking enabled.
EXAMPLE
The following command returns the default object lock configuration
for the mydata
bucket on the myminio
MinIO
deployment:
mc retention info --default myminio/mydata
SYNTAX
The command has the following syntax:
mc [GLOBALFLAGS] retention info \
[--default] \
[--recursive] \
[--rewind "string"] \
[--version-id "string"]* \
[--versions] \
ALIAS
mc retention info --version-id
is mutually
exclusive with multiple other parameters. See the reference
documentation for more information.
Parameters
ALIAS
Required
The full path to the object for which to retrieve the object lock
configuration. Specify the alias <alias>
of a configured S3-compatible
service as the prefix to the ALIAS
bucket path. For
example:
mc retention info play/mybucket/object.txt
- If the
ALIAS
specifies a bucket or bucket prefix, include -
~mc retention info --recursive
to return the object lock settings for all objects in the bucket or bucket prefix.
- If the
- If the
ALIAS
bucket has versioning enabled, -
mc retention info
by default applies to only the latest object version. Use~mc retention info --version-id
or~mc retention info --versions
to return the object lock settings for a specific version or for all versions of the object.
- If the
--default
Optional Returns the default object lock settings for the
bucket specified to ~mc retention info ALIAS
.
If specifying ~mc retention info --default
, mc retention info
ignores all
other flags.
--recursive, r
Optional Recursively returns the object lock settings for
all objects in the specified ~mc retention info ALIAS
path.
Mutually exclusive with ~mc retention info --version-id
.
--rewind
--version-id, vid
Mutually exclusive with any of the following flags:
~mc retention info --versions
~mc retention info --rewind
~mc retention info --recursive
--versions
Use ~mc retention info --versions
and ~mc retention info --rewind
together to retrieve
the retention settings for all object versions that existed at a
specific point-in-time.
Global Flags
Examples
Retrieve Object Lock Settings for an Object or Object(s)
Specific Object
mc retention info ALIAS/PATH
- Replace
ALIAS <mc retention info ALIAS>
with thealias <mc alias>
of a configured S3-compatible host. - Replace
PATH <mc retention info ALIAS>
with the path to the object.
Multiple Objects
Use mc retention info
with ~mc retention info --recursive
to retrieve the
retention settings for all objects in a bucket:
mc retention info --recursive ALIAS/PATH
- Replace
ALIAS <mc retention info ALIAS>
with thealias <mc alias>
of a configured S3-compatible host. - Replace
PATH <mc retention info ALIAS>
with the path to the bucket.
Retrieve Default Object Lock Settings for a Bucket
Use mc retention info
with ~mc retention info --default
to retrieve the
default object lock settings for a bucket:
mc retention info --default ALIAS/PATH
- Replace
ALIAS <mc retention info ALIAS>
with the -
alias <mc alias>
of a configured S3-compatible host.
- Replace
- Replace
PATH <mc retention info ALIAS>
with the path to the bucket.