mc admin config

Description

The mc admin config command manages configuration settings for the AIStor Server.

Settings defined by environment variables on the server override settings defined with this command. The commands that read configuration show environment variables in their output, but you cannot change them from the client.

Examples

Change a configuration setting

The following command sets the region name for the deployment with the alias myaistor:

mc admin config set myaistor region name=us-west-1

See mc alias for more information on aliases.

Review the current value of a setting

The following command displays the current compression settings:

mc admin config get myaistor compression

Back up and restore the configuration

The following commands write the current configuration to a file, then apply that file to the deployment:

mc admin config export myaistor > config.txt
mc admin config import myaistor < config.txt

This backup covers only the settings managed by mc admin config. Settings that come from environment variables on the server appear in the export as comments and are not applied on import. Back those up separately.

Syntax

mc admin config has the following syntax:

mc admin config COMMAND [ARGUMENTS]

mc admin config supports the following commands:

Referring to a subsystem

get, set, and reset identify a setting by its subsystem and, optionally, by one or more keys within that subsystem.

You can write a subsystem with underscores or with dots. log_api_webhook and log api webhook refer to the same subsystem.

Some subsystems support named targets. Append the target name after a colon, as in notify_mqtt:name1.

For the list of subsystems and the keys each one accepts, see Settings Overview.

mc admin config set

Sets a configuration key on the MinIO AIStor deployment. Configurations defined by environment variables override configurations defined by this command.

mc admin config set has the following syntax:

mc admin config set ALIAS [SUBSYSTEM [KEY=VALUE ...]] \
                          [--env]                     \
                          [--tree, -v]

The command behaves differently depending on how many arguments you pass:

Arguments Result
ALIAS Lists the available subsystems.
ALIAS SUBSYSTEM Describes the keys the subsystem accepts.
ALIAS SUBSYSTEM KEY=VALUE Sets the specified keys.

Some settings do not take effect until you restart the deployment. The command tells you when a restart is required.

ALIAS

Required

The alias of a configured MinIO AIStor deployment.

SUBSYSTEM

Optional

The subsystem to modify, such as region or notify_webhook. See Referring to a subsystem.

KEY=VALUE

Optional

One or more settings to apply, each written as KEY=VALUE. Separate multiple settings with spaces.

--env

Optional

Describes the settings as environment variables instead of as configuration keys.

This parameter affects only the descriptive output the command produces when you do not name a key to change. It has no effect on the change itself.

--tree

Alias: -v

Optional

Displays the subsystems as a tree.

This parameter applies only when the command lists the subsystems.

mc admin config get

Gets a configuration key on the MinIO AIStor deployment created using mc admin config set.

mc admin config get has the following syntax:

mc admin config get ALIAS [SUBSYSTEM ...] \
                          [--string]      \
                          [--tree, -v]

Pass the alias on its own to list the available subsystems.

The output includes settings that come from environment variables on the server. You cannot change those from the client.

ALIAS

Required

The alias of a configured MinIO AIStor deployment.

SUBSYSTEM

Optional

The subsystem to display, such as compression or notify_webhook. See Referring to a subsystem.

--string

Optional

Prints the raw configuration string on a single line, without the per-key descriptions that the command otherwise includes.

--tree

Alias: -v

Optional

Displays the subsystems as a tree.

This parameter applies only when the command lists the subsystems.

mc admin config reset

Resets config to defaults. Configurations defined in environment variables are not affected.

mc admin config reset has the following syntax:

mc admin config reset ALIAS [SUBSYSTEM [KEY ...]] \
                            [--env]               \
                            [--tree, -v]

Pass the alias on its own to list the available subsystems. Naming a subsystem without a key resets every key in that subsystem.

ALIAS

Required

The alias of a configured MinIO AIStor deployment.

SUBSYSTEM

Optional

The subsystem to reset, such as compression or notify_mqtt:name1. See Referring to a subsystem.

KEY

Optional

One or more keys within the subsystem to reset. Separate multiple keys with spaces.

--env

Optional

Describes the settings as environment variables instead of as configuration keys.

This parameter affects only the descriptive output the command produces when you do not name a key to change. It has no effect on the change itself.

--tree

Alias: -v

Optional

Displays the subsystems as a tree.

This parameter applies only when the command lists the subsystems.

mc admin config history

Lists the history of changes made to configuration keys by mc admin config.

Configurations defined by environment variables do not show.

mc admin config history has the following syntax:

mc admin config history ALIAS \
                        [--count, -n int] \
                        [--clear, -c]

Each entry has a restore ID. Pass that ID to restore to roll the configuration back to that point.

ALIAS

Required

The alias of a configured MinIO AIStor deployment.

--count

Alias: -n

Optional

The number of entries to list, most recent first. Defaults to 10.

--clear

Alias: -c

Optional

Deletes the entire configuration history.

Clearing the history does not change the current configuration, but it does remove the restore IDs that restore depends on.

mc admin config restore

Roll back changes to configuration keys to a previous point in history.

Does not affect configurations defined by environment variables.

mc admin config restore has the following syntax:

mc admin config restore ALIAS RESTOREID

restore always advises restarting the deployment. The deployment saves the restored configuration without applying it, so the settings take effect only after the restart. This differs from set, which applies many settings immediately and asks for a restart only when one is needed.

ALIAS

Required

The alias of a configured MinIO AIStor deployment.

RESTOREID

Required

The restore ID of the configuration to roll back to. Use history to list the available IDs.

mc admin config export

Exports any configuration settings created using mc admin config set.

mc admin config export has the following syntax:

mc admin config export ALIAS

The command writes the configuration to standard output. Redirect it to a file to keep a copy.

The output records the settings that come from environment variables on the server, but writes them as comments. import ignores those lines, so they serve as a record rather than as something you can apply.

ALIAS

Required

The alias of a configured MinIO AIStor deployment.

mc admin config import

Imports configuration settings exported using mc admin config export.

mc admin config import has the following syntax:

mc admin config import ALIAS

The command reads the configuration from standard input. Redirect a file into the command to apply it.

The command ignores commented lines, including the environment variables that export records. Change those on the server itself.

import always advises restarting the deployment. The deployment saves the imported configuration without applying it, so the settings take effect only after the restart. This differs from set, which applies many settings immediately and asks for a restart only when one is needed.

ALIAS

Required

The alias of a configured MinIO AIStor deployment.

Configuration settings

For a list of available configuration settings, see Settings Overview.