1
0
mirror of https://github.com/minio/docs.git synced 2025-08-05 03:41:24 +03:00
Files
docs/source/reference/minio-mc/mc-batch-generate.rst
Ravind Kumar a065b7a29f DOCS-1083: MinIO Server Release RELEASE.2023-12-02T10-51-33Z (#1097)
# Summary

Closes #1083 

Also reorganizes the batch framework pages. Could use additional
refinement, but considering that out of scope for now.

---------

Co-authored-by: Daryl White <53910321+djwfyi@users.noreply.github.com>
2024-01-02 14:25:04 -05:00

4.6 KiB

mc batch generate

minio

Table of Contents

mc batch generate

MinIO RELEASE.2022-10-08T20-11-00Z or later

Syntax

The mc batch generate command creates a basic YAML-formatted template file for the specified job type.

After MinIO creates the file, open it in your preferred text editor tool to further customize. You can define one job task definition per batch file.

See job types <minio-batch-job-types> for the supported jobs you can generate.

EXAMPLE

The following command creates a basic YAML file for a replicate job on the mybucket bucket of the myminio alias.

mc batch generate myminio/mybucket replicate

SYNTAX

The command has the following syntax:

mc [GLOBALFLAGS] batch generate \
                       TARGET   \
                       JOBTYPE

Parameters

TARGET

The alias <alias> used to generate the YAML template file. The specified alias does not restrict the deployment(s) where you can use the generated file.

For example:

mc batch generate myminio replicate

JOBTYPE

The type of job to generate a YAML document for.

Supports the following values:

  • minio-mc-batch-generate-replicate-job
  • minio-mc-batch-generate-keyrotate-job
  • minio-mc-batch-generate-expire-job (Added mc.RELEASE.2023-12-02T11-24-10Z)

Global Flags

Examples

Generate a yaml File for a Replicate Job Type

The following command generates a YAML blueprint for a replicate type batch job and names the file replicate with the .yaml extension:

mc batch generate alias replicate > replicate.yaml
  • Replace alias with the alias <mc alias> to use to generate the yaml file.

  • Replace replicate with the type of job to generate a yaml file for.

    `mc batch supports the replicate and keyrotate` job types.

S3 Compatibility

Job Types

mc batch currently supports the following job task types:

  • minio-mc-batch-generate-replicate-job

    Replicate objects between two MinIO deployments. Provides similar functionality to bucket replication <minio-bucket-replication> as a batch job rather than continual scanning function.

  • minio-mc-batch-generate-keyrotate-job

    MinIO RELEASE.2023-04-07T05-28-58Z

    Rotate the sse-s3 or sse-kms keys for objects at rest on a MinIO deployment.

  • minio-mc-batch-generate-expire-job

    MinIO RELEASE.2023-12-02T10-51-33Z

    Expire objects based using similar semantics as minio-lifecycle-management-create-expiry-rule.

replicate

You can use the following example configuration as the starting point for building your own custom replication batch job:

/includes/code/replicate.yaml

See minio-batch-framework-replicate-job-ref for more complete documentation on each key.

keyrotate

You can use the following example configuration as the starting point for building your own custom key rotation batch job:

/includes/code/keyrotate.yaml

See minio-batch-framework-keyrotate-job-ref for more complete documentation on each key.

expire

You can use the following example configuration as a starting point for building your own custom expiration batch job:

/includes/code/keyrotate.yaml

See minio-batch-framework-expire-job-ref for more complete documentation on each key.