Changed in version MinIO: RELEASE.2022-10-08T20-11-00Z or later
mc batch start command launches a batch job from a job batch YAML file.
The batch job runs to completion (or up to the number of retries specified in the file) one time. To run the batch job again after completion, you must start it again.
The following command creates a basic YAML file for a replicate job on the
mybucket bucket of the
mc batch start myminio/mybucket jobfile.yaml
The output of the above command is something similar to:
Successfully start 'replicate' job `B34HHqnNMcg1taynaPfxu` on '2022-10-24 17:19:06.296974771 -0700 PDT'
The command has the following syntax:
mc [GLOBALFLAGS] batch start \ TARGET \ JOBFILE
indicate optional parameters.
Parameters sharing a line are mutually dependent.
Parameters seperated 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.
The alias and bucket on the MinIO deployment to which to add the object lifecycle management rule.
mc batch start myminio/mydata replicate.yaml
You can use just an alias without specifying a bucket to perform the job at the deployment’s root.
This command supports any of the global flags.
The following command starts the batch of job(s) defined in the file
replication.yaml on the deployment at
mc batch start myminio ./replication.yaml
aliasof the MinIO deployment that should run the job.
./replication.yamlwith the yaml-formatted file that describes the batch job. Use the file path relative to your current location.
The output of the above command is similar to the following:
Successfully start 'replicate' job `E24HH4nNMcgY5taynaPfxu` on '2022-09-26 17:19:06.296974771 -0700 PDT'
The mc commandline tool is built for compatibility with the AWS S3 API and is tested MinIO and AWS S3 for expected functionality and behavior.
MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.