MinIO Client (mc) – the ‚mirror‘ command synchronizes data between filesystems and object storages similarly to rsync

  MinIO Client (mc) – provides a modern alternative to Linux commands like ls, cat, cp, mirror, diff etc. and it supports filesystems and Amazon S3 compatible cloud storage service (AWS Signature v2 and v4)

MinIO Client (mc) – Quickstart Guide

USAGE:
mc mirror [FLAGS] SOURCE TARGET
FLAGS:
–overwrite overwrite object(s) on target if it differs from source
–fake perform a fake mirror operation
–watch, -w watch and synchronize changes
–remove remove extraneous object(s) on target
–region value specify region when creating new bucket(s) on target (default: „us-east-1“)
–preserve, -a preserve file system attributes and bucket policy rules on target bucket(s)
–exclude value exclude object(s) that match specified object name pattern
–older-than value filter object(s) older than N days (default: 0)
–newer-than value filter object(s) newer than N days (default: 0)
–storage-class value, –sc value specify storage class for new object(s) on target
–encrypt value encrypt/decrypt objects (using server-side encryption with server managed keys)
–encrypt-key value encrypt/decrypt objects (using server-side encryption with customer provided keys)
–help, -h show help
C:\>mc
mc: Configuration written to `C:\Users\Josef\mc\config.json`. Please update your
access credentials.
mc: Successfully created `C:\Users\Josef\mc\share`.
mc: Initialized share uploads `C:\Users\Josef\mc\share\uploads.json` file.
mc: Initialized share downloads `C:\Users\Josef\mc\share\downloads.json` file.
NAME:
mc – MinIO Client for cloud storage and filesystems.
USAGE:
mc [FLAGS] COMMAND [COMMAND FLAGS | -h] [ARGUMENTS…]
COMMANDS:
alias set, remove and list aliases in configuration file
ls list buckets and objects
mb make a bucket
rb remove a bucket
cp copy objects
mirror synchronize object(s) to a remote site
cat display object contents
head display first ’n‘ lines of an object
pipe stream STDIN to an object
share generate URL for temporary access to an object
find search for objects
sql run sql queries on objects
stat show object metadata
mv move objects
tree list buckets and objects in a tree format
du summarize disk usage recursively
retention set retention for object(s)
legalhold manage legal hold for object(s)
diff list differences in object name, size, and date between two buckets
rm remove objects
version manage bucket versioning
ilm manage bucket lifecycle
encrypt manage bucket encryption config
event manage object notifications
watch listen for object notification events
undo undo PUT/DELETE operations
policy manage anonymous access to buckets and objects
tag manage tags for bucket and object(s)
replicate configure server side bucket replication
admin manage MinIO servers
update update mc to latest release
GLOBAL FLAGS:
–autocompletion install auto-completion for your shell
–config-dir value, -C value path to configuration folder (default: „C:\\User
s\\Josef\\mc“)
–quiet, -q disable progress bar display
–no-color disable color theme
–json enable JSON lines formatted output
–debug enable debug output
–insecure disable SSL certificate verification
–help, -h show help
–version, -v print the version
TIP:
Use ‚mc –autocompletion‘ to enable shell autocompletion
VERSION:
RELEASE.2021-04-22T17-40-00Z

Microsoft Windows Binary Download
https://dl.min.io/client/mc/release/windows-amd64/mc.exe

to disable SSL certificate verification use the option –insecure

C:\>mc config host add myminio http://192.168.1.151:9000 <AccessKey> <SecretKey>
Added `myminio` successfully.
C:\>mc admin update myminio
Server `myminio` updated successfully from 2021-01-16T02:19:44Z to 2021-04-22T15
-44-28Z
C:\>mc mb myminio/photos
Bucket created successfully `myminio/photos`.
C:\>mc cp -r C:\Users\Josef\Photos myminio/photos
…Thumbs.db: 738.00 KiB / 738.00 KiB [======================] 105.47 KiB/s 6s
C:\>mc mirror C:\Users\Josef\Photos myminio/photos
…josef.jpg: 738.00 KiB / 738.00 KiB [======================] 140.04 KiB/s 5s
C:\>mc mirror C:\Users\Josef\Photos myminio/photos
0 B / ? [ =] 0s
C:\>mc mirror C:\Users\Josef\Photos myminio/photos
0 B / ? [ =] 0s
C:\>mc mirror C:\Users\Josef\Photos myminio/photos
0 B / ? [ =] 0s
C:\>

Linux ARM Binary Download

# wget https://dl.minio.io/client/mc/release/linux-arm/mc
# chmod +x ./mc
remove extraneous object(s) on target
# ./mc mirror –remove myminio/photos /mnt/gv0
0 B / ? ┃░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▓┃ 0s
overwrite object(s) on target if it differs from source
# ./mc mirror –overwrite myminio/photos /mnt/gv0
0 B / ? ┃░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▓┃ 0s
watch and synchronize changes
# ./mc mirror –watch myminio/photos /mnt/gv0
0 B / ? ┃░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▓

Leave a Reply

You must be logged in to post a comment.