Skip to content

Commit a64cfaa

Browse files
Merge pull request #250634 from aditivgupta/mysqlimp
M25
2 parents 31c1ec5 + 672d52e commit a64cfaa

File tree

1 file changed

+20
-12
lines changed

1 file changed

+20
-12
lines changed

articles/mysql/migrate/migrate-single-flexible-mysql-import-cli.md

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ ms.devlang: azurecli
2020

2121
Azure MySQL Import enables you to migrate your Azure Database for MySQL seamlessly - Single Server to Flexible Server. It uses snapshot backup and restores technology to offer a simple and fast migration path to restore the source server's physical data files to the target server. Post MySQL Import operation, you can take advantage of the benefits of Flexible Server, including better price & performance, granular control over database configuration, and custom maintenance windows.
2222

23-
Azure MySQL Import currently supports the offline mode of import. Based on user-inputs, it takes up the responsibility of provisioning your target Flexible Server and then taking the backup of the source server and restoring the target.
23+
Azure MySQL Import currently supports the offline mode of import. Based on user-inputs, it takes up the responsibility of provisioning your target Flexible Server and then taking the backup of the source server and restoring the target. It copies the data files, server parameters and server properties - tier, version, sku-name, storage-size, location, geo-redundant-backup, public-access, tags, auto grow, backup-retention-days, admin-user and admin-password from Single to Flexible Server instance.
2424

2525
This tutorial shows how to use the Azure MySQL Import CLI command to migrate your Azure Database for MySQL Single Server to Flexible Server.
2626

@@ -30,7 +30,7 @@ The [Azure Cloud Shell](../../cloud-shell/overview.md) is a free interactive she
3030

3131
To open the Cloud Shell, select **Try it** from the upper right corner of a code block. You can also open Cloud Shell in a separate browser tab by going to [https://shell.azure.com/bash](https://shell.azure.com/bash). Select **Copy** to copy the blocks of code, paste it into the Cloud Shell, and select **Enter** to run it.
3232

33-
If you prefer to install and use the CLI locally, this tutorial requires Azure CLI version 2.50.0 or later. Run `az --version` to find the version. If you need to install or upgrade, see [Install Azure CLI](/cli/azure/install-azure-cli).
33+
If you prefer to install and use the CLI locally, this tutorial requires Azure CLI version 2.52.0 or later. Run `az --version` to find the version. If you need to install or upgrade, see [Install Azure CLI](/cli/azure/install-azure-cli).
3434

3535
## Prerequisites
3636

@@ -49,15 +49,14 @@ az account set --subscription <subscription id>
4949
## Limitations
5050

5151
- The source Azure Database for MySQL - Single Server and the target Azure Database for MySQL - Flexible Server must be in the same subscription, resource group, region, and on the same MySQL version. MySQL Import across subscriptions, resource groups, regions, and versions isn't possible.
52-
- MySQL versions supported by Azure MySQL Import are 5.7 and 8.0.21. If you are on a different MySQL version on Single Server, make sure to upgrade your version on your Single Server instance before triggering the import command.
52+
- MySQL versions supported by Azure MySQL Import are 5.7 and 8.0. If you are on a different major MySQL version on Single Server, make sure to upgrade your version on your Single Server instance before triggering the import command.
5353
- MySQL Import for Single Servers with Legacy Storage architecture (General Purpose storage V1) isn't supported. You must upgrade your storage to the latest storage architecture (General Purpose storage V2) to trigger a MySQL Import operation. Find your storage type and upgrade steps by following directions [here](../single-server/concepts-pricing-tiers.md#how-can-i-determine-which-storage-type-my-server-is-running-on).
5454
- MySQL Import to an existing Azure MySQL Flexible Server isn't supported. The CLI command initiates the import of a new Azure MySQL Flexible Server.
5555
- If the flexible target server is provisioned as non-HA (High Availability disabled) when updating the CLI command parameters, it can later be switched to Same-Zone HA but not Zone-Redundant HA.
5656
- MySQL Import doesn't currently support Azure Database for MySQL Single Servers with Customer managed key (CMK).
5757
- MySQL Imposer doesn't currently support Azure Database for MySQL Single Servers with Infrastructure Double Encryption.
5858
- Only instance-level import is supported. No option to import selected databases within an instance is provided.
5959
- Below items should be copied from source to target by the user post MySQL Import operation:
60-
- Server parameters
6160
- Firewall rules
6261
- Read-Replicas
6362
- Monitoring page settings (Alerts, Metrics, and Diagnostic settings)
@@ -72,10 +71,10 @@ az mysql flexible-server import create --data-source-type
7271
--data-source
7372
--resource-group
7473
--name
75-
--sku-name
76-
--tier
77-
--version
78-
--storage-size
74+
[--sku-name]
75+
[--tier]
76+
[--version]
77+
[--storage-size]
7978
[--mode]
8079
[--admin-password]
8180
[--admin-user]
@@ -102,10 +101,16 @@ az mysql flexible-server import create --data-source-type
102101
[--zone]
103102
```
104103

105-
The following example takes in the data source information for Single Server named 'test-single-server' and target Flexible Server information, creates a target Flexible Server named `test-flexible-server` in the `westus` location (same location as that of the source Single Server) and performs an import from source to target.
104+
The following example takes in the data source information for Single Server named 'test-single-server' and target Flexible Server information, creates a target Flexible Server named `test-flexible-server` in the `westus` location (same location as that of the source Single Server) and performs an import from source to target. MySQL Import command maps over the corresponding tier, version, sku-name, storage-size, location, geo-redundant-backup, public-access, tags, auto grow, backup-retention-days, admin-user and admin-password properties from Single Server to Flexible Server as smart defaults if no inputs are provided to the CLI command. You can chose to override the smart defaults by providing inputs for these optional parameters.
106105

107106
```azurecli-interactive
108-
az mysql flexible-server import create --data-source-type "mysql_single" --data-source "test-single-server" --resource-group "test-rg" --location westus --name "test-flexible-server" --admin-user "username" --admin-password "password" --sku-name "Standard_B1ms" --tier "Burstable" --public-access 0.0.0.0 --storage-size 32 --tags "key=value" --version 5.7 --high-availability ZoneRedundant --zone 1 --standby-zone 3 --storage-auto-grow Enabled --iops 500
107+
az mysql flexible-server import create --data-source-type "mysql_single" --data-source "test-single-server" --resource-group "test-rg" --name "test-flexible-server"
108+
```
109+
110+
The following example takes in the data source information for Single Server named 'test-single-server' and target Flexible Server information, creates a target Flexible Server named `test-flexible-server` in the `westus` location (same location as that of the source Single Server) with Zone Redundancy enabled and virtual network integration and performs an import from source to target. Learn more about virtual network configuration [here](../flexible-server/how-to-manage-virtual-network-cli.md).
111+
112+
```azurecli-interactive
113+
az mysql flexible-server import create --data-source-type "mysql_single" --data-source "test-single-server" --resource-group "test-rg" --name "test-flexible-server" --high-availability ZoneRedundant --zone 1 --standby-zone 3 --vnet "myVnet" --subnet "mySubnet" --private-dns-zone "myserver.private.contoso.com"
109114
```
110115

111116
Here are the details for the arguments above:
@@ -123,9 +128,12 @@ admin-password | *password* | The administrator user's password for your target
123128
sku-name|GP_Gen5_2|Enter the name of the pricing tier and compute configuration for your target Azure Database for MySQL Flexible Server. Follows the convention {pricing tier}*{compute generation}*{vCores} in shorthand. See the [pricing tiers](../flexible-server/concepts-service-tiers-storage.md#service-tiers-size-and-server-types) for more information.
124129
tier | Burstable | Compute tier of the target Azure Database for MySQL Flexible Server. Accepted values: Burstable, GeneralPurpose, MemoryOptimized; Default value: Burstable.
125130
public-access | 0.0.0.0 | Determines the public access for the target Azure Database for MySQL Flexible Server. Enter single or range of IP addresses to be included in the allowed list of IPs. IP address ranges must be dash-separated and not contain any spaces. Specifying 0.0.0.0 allows public access from any resources deployed within Azure to access your server. Setting it to "None" sets the server in public access mode but doesn't create a firewall rule.
131+
vnet | myVnet | Name or ID of a new or existing virtual network. If you want to use a vnet from different resource group or subscription, please provide a resource ID. The name must be between 2 to 64 characters. The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens.
132+
subnet | mySubnet | Name or resource ID of a new or existing subnet. If you want to use a subnet from different resource group or subscription, please provide resource ID instead of name. Please note that the subnet will be delegated to flexibleServers. After delegation, this subnet cannot be used for any other type of Azure resources.
133+
private-dns-zone | myserver.private.contoso.com | The name or id of new or existing private dns zone. You can use the private dns zone from same resource group, different resource group, or different subscription. If you want to use a zone from different resource group or subscription, please provide resource Id. CLI creates a new private dns zone within the same resource group as virtual network if not provided by users.
126134
storage-size | 32 | The storage capacity of the target Azure Database for MySQL Flexible Server. The minimum is 20 GiB, and max is 16 TiB.
127135
tags | key=value | Provide the name of the Azure resource group.
128-
version | 5.7 | Server major version of the target Azure Database for MySQL Flexible Server. Default value: 5.7.
136+
version | 5.7 | Server major version of the target Azure Database for MySQL Flexible Server.
129137
high-availability | ZoneRedundant | Enable (ZoneRedundant or SameZone) or disable the high availability feature for the target Azure Database for MySQL Flexible Server. Accepted values: Disabled, SameZone, ZoneRedundant; Default value: Disabled.
130138
zone | 1 | Availability zone into which to provision the resource.
131139
standby-zone | 3 | The availability zone information of the standby server when high Availability is enabled.
@@ -136,7 +144,7 @@ iops | 500 | Number of IOPS to be allocated for the target Azure Database for My
136144

137145
Before you trigger the Azure MySQL Import command, consider the following parameter configuration guidance to help ensure faster data loads using Azure MySQL Import.
138146

139-
- Select the compute tier and SKU name for the target flexible server based on the source single server’s pricing tier and VCores based on the detail in the following table.
147+
- If you want to override smart defaults, select the compute tier and SKU name for the target flexible server based on the source single server’s pricing tier and VCores based on the detail in the following table.
140148

141149
| Single Server Pricing Tier | Single Server VCores | Flexible Server Tier | Flexible Server SKU Name |
142150
| ------------- | ------------- |:-------------:|:-------------:|

0 commit comments

Comments
 (0)