A few quick fixes noted in several issues: - Literal reference in mc batch generate pointed to the wrong include Closes #1318 - Lingering reference to an "unregister" function removed Closes #1324 - Adds admonition about root credentials required, even with KES Closes #1325 - Adds mc batch cancel to list of commands on batch framework overview page Closes #1310 - Updates mc client page S3 link to avoid possible copy/paste confusion Closes #1311
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 replicate
SYNTAX
The command has the following syntax:
mc [GLOBALFLAGS] batch generate \
ALIAS \
JOBTYPE
Parameters
ALIAS
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
(Addedmc.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 thealias <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/expire.yaml
See minio-batch-framework-expire-job-ref
for more complete
documentation on each key.