Updates for mc release 2022-08-23 Closes #536 - Thoroughly updated the `mc ilm add` reference page and added --prefix and --newer** flags. - Updates the `mc ilm edit` reference page to add the --prefix, --disable, and --enable flags. - Adds `mc od` command - Adds `--with-versioning` flag to `mc mb` - Adds `--api-key` to `mc support diag` - Adds clarification to --airgap flag on `mc license` and `mc support` topics that flag is not required if the local device has network access, even if the deployment is airgapped.
5.0 KiB
mc od
minio
Table of Contents
mc od
Syntax
The mc od
command
copies a local file to a remote location in a specified number of parts
and part sizes. The command outputs the time it took to upload the
file.
Use the mc od
to
mimic the functionality of the Linux dd
command.
EXAMPLE
The following command Upload 200MiB of a file to a bucket in 5 parts of size 40MiB. The output shows the results of the upload, including the length of time it took for the upload to complete.
mc od if=file.zip of=myminio/mybucket/file.zip size=40MiB parts=5
If passing the --json
global flag <minio-mc-global-options>
, the
output of the command resembles the following:
{
"source": "home/user/file.zip"
"target": "myminio/mybucket/file.zip"
"partSize": 41943040
"totalSize": 209715200
"parts": 5
"elapsed": "314ms"
}
SYNTAX
The command has the following syntax:
mc [GLOBALFLAGS] od \
if=<path of source file to upload> \
of=<target MinIO path to upload to> \
[size=<size of file>] \
[parts=<number of parts to split file into>] \
[skip=<number of parts to skip>]
Parameters
if
The path of the source object to use for the upload. Use the full path relative to your current location.
mc od if=file.zip of=myminio/mybucket/file.zip
of
The full target path to upload the object to.
size
The size for each part of the file to upload. If not specified, MinIO determines the size for parts from the source stream.
parts
The number of parts to divide the object into for uploading. If not specified, MinIO determines the number of parts based on the size of the source stream.
skip
The number of parts of the file to skip during the upload. For example, use this option to test the upload speed for a large file of many parts on only a portion of the object's parts.
Global Flags
Examples
Upload a Full File with 40MiB Parts
Use mc od
to upload a
file to MinIO in a set of parts of specified size. The ~mc od size
option allows
you to specify the desired part size.
mc od if=file.zip of=myminio/mybucket/file.zip size=40MiB
- Replace
myminio/mybucket/file.zip
with the path of the object or file stream to upload. - Replace
size <mc od size>
with the desired size of the object parts.
MinIO examines the source file and divides it into the necessary number of parts so that no part is larger than the specified 40MiB part size.
Upload a First Five 40 MiB Parts of a File
Use mc od
to upload
parts of a file to MinIO of specified part size. The ~mc od size
option allows
you to specify the desired part size. The ~mc od parts
option allows you to specify the total
number of parts to use for the object.
mc od if=file.zip of=myminio/mybucket/file.zip size=40MiB parts=5
- Replace
myminio/mybucket/file.zip
with the path of the object or file stream to upload. - Replace
size <mc od size>
with the desired size of the object parts. - Replace
parts <mc od parts>
with the number of desired parts to use for the object.
In this command example, if the source object stream is larger than 200MiB (40MiB × 5 parts), only the first 200MiB of the file upload.
Important
Using the command this way may not upload the entirety of an object.
Upload a Full File in 5 Parts
Take a source file, divide the file into a specified number of parts, then upload all parts of the file to a MinIO target.
mc od if=file.zip of=myminio/mybucket/file.zip parts=5
The above command divides the source file into five equal parts, then uploads those parts.