mc admin cluster iam export

The mc admin cluster iam export command exports IAM metadata for use with the mc admin cluster iam import command.

The command saves the output as ALIAS-iam-metadata.zip, where ALIAS is the alias of the MinIO AIStor deployment.

Syntax

Parameters

ALIAS

Required

The alias of the MinIO AIStor deployment to export IAM metadata for.

--output, --o

Optional

Specify a custom file and path to use when exporting the IAM data.

Global Flags

This command supports any of the global flags.

Examples

Download all IAM metadata for a cluster to a ZIP file

The following command downloads all IAM metadata for the cluster at alias myaistor, then stores the metadata to a ZIP file.

mc admin cluster iam export myaistor

The ZIP file is named <alias>-iam-info.zip where <alias> is the alias of the cluster. For the above example, the file is named myaistor-iam-info.zip.

The file is placed in the current active directory path.

Download all IAM metadata for a cluster and specify the name and path of the ZIP file

The following command downloads all IAM metadata for the cluster at alias myaistor, then stores the metadata to a ZIP file at /tmp/myaistor-iam.zip.

mc admin cluster iam export myaistor --output /tmp/myaistor-iam.zip

Behavior

Verify the archive before you rely on it

MinIO AIStor exports each piece of IAM metadata on its own. If it cannot read one of them, it logs the reason, skips that entry, and finishes the rest — but it does not write the archive’s index. The download completes, and the resulting .zip file fails to open.

Open the archive after every export you intend to keep as a backup. If it does not open, search the server log for error exporting to find which piece failed, then run the export again.