You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can migrate an instance of Azure Database for PostgreSQL – Single Server to Azure Database for PostgreSQL – Flexible Server by using the Azure Command Line Interface (CLI). In this tutorial, we will perform migration of a sample database from an Azure Database for PostgreSQL single server to a PostgreSQL flexible server using the Azure CLI.
17
+
You can migrate an instance of Azure Database for PostgreSQL – Single Server to Azure Database for PostgreSQL – Flexible Server by using the Azure Command Line Interface (CLI). In this tutorial, we perform migration of a sample database from an Azure Database for PostgreSQL single server to a PostgreSQL flexible server using the Azure CLI.
18
18
19
19
>[!NOTE]
20
20
> The migration tool is in public preview.
21
21
22
-
In this tutorial, you'll learn about:
22
+
In this tutorial, you learn about:
23
23
24
24
> [!div class="checklist"]
25
25
>
@@ -56,12 +56,12 @@ To complete this tutorial, you need to:
56
56
az login
57
57
```
58
58
59
-
A browser window opens with the Azure sign-in page. Provide your Azure credentials to do a successful authentication. For other ways to sign with the Azure CLI, please refer [this article](/cli/azure/authenticate-azure-cli).
59
+
A browser window opens with the Azure sign-in page. Provide your Azure credentials to do a successful authentication. For other ways to sign with the Azure CLI, refer [this article](/cli/azure/authenticate-azure-cli).
60
60
61
61
## Migration CLI commands
62
62
63
63
The migration tool comes with easy-to-use CLI commands to do migration-related tasks. All the CLI commands start with `az postgres flexible-server migration`.
64
-
Allow-list all required extensions as shown in [Migrate from Azure Database for PostgreSQL Single Server to Flexible Server](./concepts-single-to-flexible.md#allow-list-required-extensions). It is very important to allow-list the extensions before you initiate a migration using this tool.
64
+
Allow-list all required extensions as shown in [Migrate from Azure Database for PostgreSQL Single Server to Flexible Server](./concepts-single-to-flexible.md#allow-list-required-extensions). It is important to allow-list the extensions before you initiate a migration using this tool.
65
65
For help with understanding the options associated with a command and with framing the right syntax, you can use the `help` parameter:
66
66
67
67
```azurecli-interactive
@@ -142,32 +142,32 @@ The structure of the JSON is:
142
142
143
143
```
144
144
145
-
Below are the `create` parameters that go into the json file format shown above:
145
+
The `create` parameters that go into the json file format are as shown below:
146
146
147
147
| Parameter | Type | Description |
148
148
| ---- | ---- | ---- |
149
-
|`SourceDBServerResourceId`| Required | This is the resource ID of the Single Server source and is mandatory. |
149
+
|`SourceDBServerResourceId`| Required | This parameter is the resource ID of the Single Server source and is mandatory. |
150
150
| `SecretParameters` | Required | This parameter lists passwords for admin users for both the Single Server source and the Flexible Server target, along with the Azure Active Directory app credentials. These passwords help to authenticate against the source and target servers. They also help in checking proper authorization access to the resources.
151
151
|`DBsToMigrate`| Required | Specify the list of databases that you want to migrate to Flexible Server. You can include a maximum of eight database names at a time. |
152
-
|`OverwriteDBsinTarget`| Required |If the target server happens to have an existing database with the same name as the one you're trying to migrate, the migration will pause until you acknowledge that overwrites in the target databases are allowed. You can avoid this pause by setting the value of this property to `true`, which gives the migration tool permission to automatically overwrite databases. |
152
+
|`OverwriteDBsinTarget`| Required |When set to true (default), if the target server happens to have an existing database with the same name as the one you're trying to migrate, migration tool automatically overwrites the database. |
153
153
|`SetupLogicalReplicationOnSourceDBIfNeeded`| Optional | You can enable logical replication on the source server automatically by setting this property to `true`. This change in the server settings requires a server restart with a downtime of two to three minutes. |
154
154
|`SourceDBServerFullyQualifiedDomainName`| Optional | Use it when a custom DNS server is used for name resolution for a virtual network. Provide the FQDN of the Single Server source according to the custom DNS server for this property. |
155
-
|`TargetDBServerFullyQualifiedDomainName`| Optional | Use it when a custom DNS server is used for name resolution inside a virtual network. Provide the FQDN of the Flexible Server target according to the custom DNS server. <br> `SourceDBServerFullyQualifiedDomainName` and `TargetDBServerFullyQualifiedDomainName`should be included as a part of the JSON only in the rare scenario of a custom DNS server being used for name resolution instead of Azure-provided DNS. Otherwise, don't include these parameters as a part of the JSON file. |
155
+
|`TargetDBServerFullyQualifiedDomainName`| Optional | Use it when a custom DNS server is used for name resolution inside a virtual network. Provide the FQDN of the Flexible Server target according to the custom DNS server. <br> `SourceDBServerFullyQualifiedDomainName` and `TargetDBServerFullyQualifiedDomainName`are included as a part of the JSON only in the rare scenario that a custom DNS server is used for name resolution instead of Azure-provided DNS. Otherwise, don't include these parameters as a part of the JSON file. |
156
156
157
157
Note these important points for the command response:
158
158
159
-
- As soon as the `create` command is triggered, the migration moves to the `InProgress` state and the `PerformingPreRequisiteSteps` substate. It takes a couple of minutes for the migration workflow to deploy the migration infrastructure and setup the connections between source and target.
159
+
- As soon as the `create` command is triggered, the migration moves to the `InProgress` state and the `PerformingPreRequisiteSteps` substate. The migration workflow takes a couple of minutes to deploy the migration infrastructure and setup connections between the source and target.
160
160
- After the `PerformingPreRequisiteSteps` substate is completed, the migration moves to the substate of `Migrating Data`, where the Cloning/Copying of the databases take place.
161
-
- Each database being migrated has its own section with all migration details, such as table count, incremental inserts, deletions, and pending bytes.
162
-
- The time that the `Migrating Data` substate takes to finish depends on the size of databases that are being migrated.
161
+
- Each database migrated has its own section with all migration details, such as table count, incremental inserts, deletions, and pending bytes.
162
+
- The time that the `Migrating Data` substate takes to finish depends on the size of databases that are migrated.
163
163
- The migration moves to the `Succeeded` state as soon as the `Migrating Data` substate finishes successfully. If there's a problem at the `Migrating Data` substate, the migration moves into a `Failed` state.
164
164
165
165
>[!NOTE]
166
-
> Gentle reminder to [allow-list the extensions](./concepts-single-to-flexible.md#allow-list-required-extensions) before you execute **Create** in case it is not yet done. It is very important to allow-list the extensions before you initiate a migration using this tool.
166
+
> Gentle reminder to [allow-list the extensions](./concepts-single-to-flexible.md#allow-list-required-extensions) before you execute **Create** in case it is not yet done. It is important to allow-list the extensions before you initiate a migration using this tool.
167
167
168
168
### List the migration(s)
169
169
170
-
The `list` command lists all the migration attempts that were made to a Flexible Server target:
170
+
The `list` command lists all the migration attempts made to a Flexible Server target:
171
171
172
172
```azurecli
173
173
az postgres flexible-server migration list [--subscription]
@@ -213,15 +213,15 @@ The following tables describe the migration states and substates.
213
213
214
214
| Migration state | Description |
215
215
| ---- | ---- |
216
-
|`InProgress`| The migration infrastructure is being set up, or the actual data migration is in progress. |
217
-
|`Canceled`| The migration has been canceled or deleted. |
216
+
|`InProgress`| The migration infrastructure is set up, or the actual data migration is in progress. |
217
+
|`Canceled`| The migration is canceled or deleted. |
218
218
|`Failed`| The migration has failed. |
219
219
|`Succeeded`| The migration has succeeded and is complete. |
220
220
221
221
| Migration substate | Description |
222
222
| ---- | ---- |
223
-
|`PerformingPreRequisiteSteps`| Infrastructure is being set up and is being prepped for data migration. |
224
-
|`MigratingData`| Data is being migrated. |
223
+
|`PerformingPreRequisiteSteps`| Infrastructure is set up and is prepped for data migration. |
224
+
|`MigratingData`| Data migration is in progress. |
225
225
|`CompletingMigration`| Migration cutover is in progress. |
226
226
|`Completed`| Cutover was successful, and migration is complete. |
0 commit comments