mc alias export

The mc alias export command exports an alias configuration from the existing configuration.

The command outputs the result to STDOUT where you can either capture the output as a file or perform further modifications to the output as necessary.

Syntax

Parameters

ALIAS

Required

The name of the alias to export.

Global Flags

This command supports any of the global flags.

Behavior

JSON Format

The command outputs a JSON object with the following schema:

{
   "url" : "https://hostname:port",
   "accessKey": "<STRING>",
   "secretKey": "<STRING>",
   "api": "s3v4",
   "path": "auto"
}

You can use the mc alias import to import the JSON document.

Examples

Export and Transform an Alias

The following example exports the alias for the play.min.io sandbox. It then transforms the configuration using the jq utility and creates a new alias from the modified configuration:

mc alias export play | jq '.accessKey = "minioadmin" | .secretKey = "minioadmin"' | mc alias import play-custom

Back Up An Alias Configuration

The following command exports an alias configuration to a JSON file. You can then back up that file using your preferred process.

mc alias export play > play-backup.json

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.