In the last edition of our Youtube Summary series, we covered Deploying MinIO with Go using the Go SDK. Today, we will be going over using MJ Johnson’s series on using MinIO Client (MC) commands to quickly and efficiently manage your MinIO environment from the command line using Linux-like tools. This roughly half-hour, ten-video course discusses everything you need to know about using the MinIO client to configure your deployment. By the end, you should feel comfortable using MC commands for all the basic functions like adding buckets, moving and viewing objects, and more with MinIO.
First, MJ starts off with an introduction to the MinIO client and how to install it. MC is designed to support both filesystems and S3-compatible services, modernizing the commands for MinIO while operating with similar commands to UNIX, allowing Linux users to feel familiar with the setup. Installation is very simple on Linux, Windows and MacOS, so you can get started working within your MinIO environment quickly.
MJ then shows how to use the mc alias command to add lists and remove S3-compatible endpoints from the MinIO client. This has three options for use: mc alias set (to configure endpoints to use), mc alias list (to show which aliases have been added and information about those aliases), and mc alias remove (to remove aliases).
Next up is using mc mb to make buckets in your MinIO environment. This command can create either a new bucket or directory at your specified path—pretty straightforward. This one can be used against the local filesystem to produce similar results to the Linux mkdir-p command line tool.
Onto using the mc ls command, which can be done both locally and for remote object storage buckets. It allows the user to list and drill down into the buckets, files within those buckets, and directories within your MinIO deployment.
Fifth in the series is copying objects to or from the MinIO environment using mc cp. This command can be used against the local filesystem to produce results similar to the Linux cp command line tool. The source for mc cp can be both a local filesystem or MinIO itself.
Next is moving files into and out of your MinIO environment using mc mv. This command moves an object from a source to a target, such as moving an object between MinIO deployments or between buckets, or from a local filesystem to or from MinIO.
Almost done—MJ then moves on to using the mc rm command to remove objects from a bucket. This one is uncomplicated, but since it involves deletion and can remove multiple objects or files in a single command, it’s important to keep in mind that you can use the –fake option to ensure the operation only targets the objects you want removed.
If you want to remove entire buckets, instead of just the objects within the bucket, you can use the mc rb command to remove one or more buckets from the MinIO environment. Just like with mc rm, this one requires caution, as it permanently deletes buckets, including object versions and bucket configurations such as lifecycle management or replication.
After mc mv comes mc mirror, supporting filesystems, MinIO deployments and other S3-compatible hosts as the synchronization source to mirror files to and from your MinIO environment. Of note here is that this command only synchronizes the current object, not the version information or metadata—to synchronize those, use mc replicate.
For the final video, MJ goes over the mc tree command, used to list all prefixes (in other words, subdirectories or folders) inside a bucket in a tree format to view exactly what is in the bucket. This command can also support listing all objects at each prefix, including the bucket root.
Though it may seem like a lot to digest, MC is built to be simple and easy to use—particularly for anybody with an existing understanding of Linux commands. The MC commands detailed above are all you need to get your MinIO deployment up to speed for whatever use cases you have in mind.
For more detailed information about installing, running, and using MinIO in any environment, please refer to our documentation here. To learn more about MinIO or get involved in our community, please visit us at min.io or join our public slack channel. If you want to see the other summaries, you can use the YouTube Summaries tag.