mc get
New in version mc: RELEASE.2024-02-24T01-33-20Z
Syntax
The mc get
command downloads an object from a target S3 deployment to the local file system.
mc get
provides a simplified interface for downloading files compared to mc cp
or mc mirror
.
mc get
uses a one-way download function that trades efficiency for the power and complexity of the other commands.
The following downloads the file logo.png
from an s3 source to the local file system at path ~/images/collateral/
.
mc get minio/marketing/logo.png ~/images/collateral
The command has the following syntax:
mc [GLOBALFLAGS] get \
SOURCE \
TARGET \
[--encrypt-key value] \
[--encrypt value]
Brackets
[]
indicate optional parameters.Parameters sharing a line are mutually dependent.
Parameters separated 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.
Parameters
- SOURCE
- Required
The full path to the alias, bucket, prefix (if used), and object to download.
- TARGET
- Required
The destination path on the local file system where the command should place the downloaded file.
- --encrypt
- Optional
Specify the key to use for decrypting and encrypting the downloaded object.
Requires that you also specify the key to use with the
--encrypt-key
flag.Alternatively, set the
MC_ENCRYPT
environment variable.
- --encrypt-key
- Optional
Specify the key to use for decrypting and encrypting the downloaded object.
Requires that you also pass the
--encrypt
flag set toTRUE
.Alternatively, set the
MC_ENCRYPT_KEY
environment variable.
Global Flags
This command supports any of the global flags.