1
0
mirror of https://github.com/minio/docs.git synced 2025-07-30 07:03:26 +03:00
Files
docs/source/minio-cli/minio-mc/mc-version.rst
2020-09-30 18:37:33 -04:00

4.4 KiB

mc version

minio

Table of Contents

mc version

Description

The mc version command enables or disables bucket versioning.

Object Locking Enables Bucket Versioning

While bucket versioning is disabled by default, configuring object locking on a bucket or an object in that bucket automatically enables versioning for the bucket. See mc lock for more information on configuring object locking.

Bucket Versioning Requires Erasure Coding

Bucket versioning requires that the MinIO deployment supports erasure coding. See <erasure coding link> for more information.

Bucket Versioning with Existing Data

Enabling bucket versioning on a bucket with existing data immediately applies a versioning ID to any unversioned object.

Disabling bucket versioning on a bucket with existing versioned data does not remove any versioned objects. Applications can continue to access versioned data after disabling bucket versioning. Use mc rm --versions ALIAS/BUCKET/OBJECT <mc rm versions> to delete an object and all its versions.

Quick Reference

mc version enable play/mybucket <mc version enable>

Enables bucket versioning on the mybucket bucket. play corresponds to the alias <mc alias> of a configured S3-compatible service.

mc version disable play/mybucket <mc version disable>

Disables bucket versioning on the mybucket bucket. play corresponds to the alias <mc alias> of a configured S3-compatible service.

mc version info play/mybucket <mc version info>

Retrieves the bucket versioning status of the mybucket bucket. play corresponds to the alias <mc alias> of a configured S3-compatible service.

Syntax

mc version COMMAND

~mc version supports the following commands:

enable

Enables bucket versioning on the specified bucket.

The command has the following syntax:

mc version enable TARGET

The command accepts the following arguments:

TARGET

Required The full path to the bucket on which to enable bucket versioning. Specify the alias <mc alias> of a configured S3-compatible service as the prefix to the ~mc version TARGET path. For example:

mc version enable play/mybucket

disable

Disables bucket versioning on the specified bucket.

The command has the following syntax:

mc version disable TARGET

The command accepts the following arguments:

TARGET

Required The full path to the bucket on which to disable bucket versioning. Specify the alias <mc alias> of a configured S3-compatible service as the prefix to the ~mc version TARGET path. For example:

mc version disable play/mybucket

info

Retrieves the bucket versioning status for the specified bucket.

The command has the following syntax:

mc version info TARGET

The command accepts the following arguments:

TARGET

Required The full path to the bucket on which to retrieve the bucket versioning status. Specify the alias <mc alias> of a configured S3-compatible service as the prefix to the ~mc version TARGET path. For example:

mc version info play/mybucket

Examples

Enable Bucket Versioning

mc version play/mybucket enable

Disable Bucket Versioning

mc version play/mybucket suspend