mc od

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.

Parameters

if

Required

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

Required

The full target path to upload the object to.

size

Optional

The size for each part of the file to upload. If not specified, AIStor determines the size for parts from the source stream.

parts

Optional

The number of parts to divide the object into for uploading. If not specified, AIStor determines the number of parts based on the size of the source stream.

skip

Optional

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

This command supports any of the global flags.

Examples

Upload a Full File with 40MiB Parts

Use mc od to upload a file to AIStor in a set of parts of specified size. The 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 with the desired size of the object parts.

AIStor 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 AIStor of specified part size. The size option allows you to specify the desired part size. The 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 with the desired size of the object parts.
  • Replace 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.

Specifying manual values for size and parts may result in incomplete objects if the total size of that upload is less than the actual 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 AIStor 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.

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with AIStor and AWS S3 for expected functionality and behavior.

AIStor 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.