แชร์ผ่าน


az mariadb server replica

Manage read replicas.

Commands

Name Description Type Status
az mariadb server replica create

Create a read replica for a server.

Core GA
az mariadb server replica list

List all read replicas for a given server.

Core GA
az mariadb server replica stop

Stop replication to a read replica and make it a read/write server.

Core GA

az mariadb server replica create

Create a read replica for a server.

az mariadb server replica create --name
                                 --resource-group
                                 --source-server
                                 [--location]
                                 [--no-wait]
                                 [--sku-name]

Examples

Create a read replica 'testreplsvr' for 'testsvr'.

az mariadb server replica create -n testreplsvr -g testgroup -s testsvr

Create a read replica 'testreplsvr' for 'testsvr2', where 'testreplsvr' is in a different resource group.

az mariadb server replica create -n testreplsvr -g testgroup \
    -s "/subscriptions/${SubID}/resourceGroups/${ResourceGroup}/providers/Microsoft.DBforMariaDB/servers/testsvr2"

Required Parameters

--name -n

Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--source-server -s

The name or resource ID of the master server to the create replica for.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--location -l

Location. Values from: az account list-locations. If not provided, the create replica will be in the same location as the master server.

--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
--sku-name

The name of the sku. Follows the convention {pricing tier}{compute generation}{vCores} in shorthand. Examples: B_Gen5_1, GP_Gen5_4, MO_Gen5_16.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az mariadb server replica list

List all read replicas for a given server.

az mariadb server replica list [--ids]
                               [--resource-group]
                               [--server-name]
                               [--subscription]

Examples

List all read replicas for master server 'testsvr'.

az mariadb server replica list -g testgroup -s testsvr

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--server-name -s

Name of the master server.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az mariadb server replica stop

Stop replication to a read replica and make it a read/write server.

az mariadb server replica stop [--ids]
                               [--name]
                               [--resource-group]
                               [--subscription]
                               [--yes]

Examples

Stop replication to 'testreplsvr' and make it a read/write server.

az mariadb server replica stop -g testgroup -n testreplsvr

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

Property Value
Parameter group: Resource Id Arguments
--name -n

Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
--yes -y

Do not prompt for confirmation.

Property Value
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False