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
Azure Database for PostgreSQL Flexible Server provides zone-redundant high availability, control over price, and control over maintenance windows. You can use the available migration tool to move your databases from Single Server to Flexible Server. To understand the differences between the two deployment options, see [this comparison chart](../flexible-server/concepts-compare-single-server-flexible-server.md).
17
+
Azure Database for PostgreSQL Flexible Server provides zone-redundant high availability, control over price, and control over maintenance windows. You can use the available migration tool to move your databases from Single Server to Flexible Server. To understand the differences between the two deployment options, see [this comparison chart](../flexible-server/concepts-compare-single-server-flexible-server.md).
18
18
19
19
Single to Flexible server migration tool is designed to help you with your migration from Single to flexible server task. The tool allows you to initiate migrations for multiple servers and databases in a repeatable way. The tool automates most of the migration steps to make the migration journey across Azure platforms as seamless as possible. The tool is offered **free of cost**.
20
20
21
21
>[!NOTE]
22
-
> The migration tool is in public preview. Feature, functionality, and user interfaces are subject to change.
22
+
> The migration tool is in public preview. Feature, functionality, and user interfaces are subject to change. Migration initiation from Single Server is enabled in preview in these regions: Central US, West US, South Central US, North Central US, East Asia, Switzerland North, Australia South East, UAE North, UK West and Canada East. However, you can use the migration wizard from the Flexible Server side as well, in all regions.
23
23
24
24
## Recommended migration path
25
25
@@ -33,12 +33,6 @@ The migration tool is agnostic of source and target PostgreSQL versions. Here ar
| Postgres 11 | Postgres 11 | You can choose to migrate to the same version in Flexible Server. You can then upgrade to a higher version in Flexible Server |
35
35
36
-
>[!NOTE]
37
-
> Migration initiation from Single Server is enabled in preview in these regions: Central US, West US, South Central US, North Central US, East Asia, Switzerland North, Australia South East, UAE North, UK West and Canada East. However, you can use the migration wizard from the Flexible Server side in all regions.
38
-
39
-
>[!IMPORTANT]
40
-
> We continue to add support for more regions with Flexible Server. If Flexible Server is not available in your preferred region, you can either choose an alternative region or you can wait until the Flexible server is enabled in that region.
41
-
42
36
## Overview
43
37
44
38
The migration tool provides an inline experience to migrate databases from Single Server (source) to Flexible Server (target).
@@ -57,17 +51,17 @@ You choose the source server and can select up to eight databases from it. This
57
51
The following diagram shows the process flow for migration from Single Server to Flexible Server via the migration tool.
58
52
59
53
:::image type="content" source="./media/concepts-single-to-flexible/concepts-flow-diagram.png" alt-text="Diagram that shows the Migration from Single Server to Flexible Server." lightbox="./media/concepts-single-to-flexible/concepts-flow-diagram.png":::
60
-
54
+
61
55
The steps in the process are:
62
56
63
57
1. Create a Flexible Server target.
64
58
2. Invoke migration.
65
59
3. Provision the migration infrastructure by using Azure Database Migration Service.
66
60
4. Start the migration.
67
-
1. Initial dump/restore (online and offline)
61
+
1. Initial dump/restore (online and offline)
68
62
1. Streaming the changes (online only)
69
63
5. Cut over to the target.
70
-
64
+
71
65
The migration tool is exposed through the Azure portal and through easy-to-use Azure CLI commands. It allows you to create migrations, list migrations, display migration details, modify the state of the migration, and delete migrations.
72
66
73
67
## Comparison of migration modes
@@ -109,40 +103,63 @@ The following table shows the approximate time for performing offline migrations
109
103
| 500 GB | 08:00 |
110
104
| 1,000 GB | 09:30 |
111
105
112
-
### Migration considerations for online mode
106
+
### Migration considerations for online mode
113
107
114
108
The migration process for online mode entails a dump of the Single Server database(s), a restore of that dump in the Flexible Server target, and then replication of ongoing changes. You capture change data by using logical decoding.
115
109
116
110
The time for completing an online migration depends on the incoming writes to the source server. The higher the write workload is on the source, the more time it takes for the data to be replicated to Flexible Server.
117
111
118
-
## Migration steps
112
+
To begin the migration in either Online or Offline mode, you can get started with the Prerequisites below.
113
+
114
+
## Migration prerequisites
115
+
116
+
>[!NOTE]
117
+
> It is very important to complete the prerequisite steps in this section before you initiate a migration using this tool.
118
+
119
+
#### Register your subscription for Azure Database Migration Service
120
+
121
+
1. On the Azure portal, go to the subscription of your Target server.
122
+
123
+
:::image type="content" source="./media/concepts-single-to-flexible/single-to-flex-azure-portal.png" alt-text="Screenshot of Azure portal subscription details." lightbox="./media/concepts-single-to-flexible/single-to-flex-azure-portal.png":::
124
+
125
+
2. On the left menu, select **Resource Providers**. Search for **Microsoft.DataMigration**, and then select **Register**.
126
+
127
+
:::image type="content" source="./media/concepts-single-to-flexible/single-to-flex-register-data-migration.png" alt-text="Screenshot of the Register button for Azure Data Migration Service." lightbox="./media/concepts-single-to-flexible/single-to-flex-register-data-migration.png":::
128
+
129
+
#### Enable logical replication
130
+
131
+
[Enable logical replication](../single-server/concepts-logical.md) on the source server.
132
+
133
+
:::image type="content" source="./media/concepts-single-to-flexible/logical-replication-support.png" alt-text="Screenshot of logical replication support in the Azure portal." lightbox="./media/concepts-single-to-flexible/logical-replication-support.png":::
134
+
135
+
>[!NOTE]
136
+
> Enabling logical replication will require a server restart for the change to take effect.
119
137
120
-
###Prerequisites
138
+
#### Create an Azure Database for PostgreSQL Flexible server
121
139
122
-
Before you start using the migration tool:
140
+
[Create an Azure Database for PostgreSQL Flexible server](../flexible-server/quickstart-create-server-portal.md) which will be used as the Target (if not created already).
123
141
124
-
-[Create an Azure Database for PostgreSQL server](../flexible-server/quickstart-create-server-portal.md).
142
+
#### Set up and configure an Azure Active Directory (Azure AD) app
125
143
126
-
-[Enable logical replication](../single-server/concepts-logical.md) on the source server.
144
+
[Set up and configure an Azure Active Directory (Azure AD) app](./how-to-set-up-azure-ad-app-portal.md). An Azure AD app is a critical component of the migration tool. It helps with role-based access control as the migration tool accesses both the source and target servers.
127
145
128
-
:::image type="content" source="./media/concepts-single-to-flexible/logical-replication-support.png" alt-text="Screenshot of logical replication support in the Azure portal." lightbox="./media/concepts-single-to-flexible/logical-replication-support.png":::
146
+
#### Assign contributor roles to Azure resources
129
147
130
-
>[!NOTE]
131
-
> Enabling logical replication will require a server restart for the change to take effect.
148
+
Assign [contributor roles](./how-to-set-up-azure-ad-app-portal.md#add-contributor-privileges-to-an-azure-resource) to source server, target server and the migration resource group. In case of private access for source/target server, add Contributor privileges to the corresponding VNet as well.
132
149
133
-
-[Set up an Azure Active Directory (Azure AD) app](./how-to-set-up-azure-ad-app-portal.md). An Azure AD app is a critical component of the migration tool. It helps with role-based access control as the migration tool accesses both the source and target servers.
150
+
#### Allow-list required extensions
134
151
135
-
-If you are using any PostgreSQL extensions on the Single Server, it has to allow-listed on the Flexible Server before initiating the migration using the steps below:
152
+
If you are using any PostgreSQL extensions on the Single Server, it has to be allow-listed on the Flexible Server before initiating the migration using the steps below:
136
153
137
-
1. Use select command in the Single Server environment to list all the extensions in use.
154
+
1. Use select command in the Single Server environment to list all the extensions in use.
138
155
139
156
```
140
157
select * from pg_extension
141
158
```
142
159
143
160
The output of the above command gives the list of extensions currently active on the Single Server
144
161
145
-
2. Enable the list of extensions obtained from step 1 in the Flexible Server. Search for the 'azure.extensions' parameter by selecting the Server Parameters tab in the side pane. Select the extensions that are to be allow-listed and click Save.
162
+
2. Enable the list of extensions obtained from step 1 in the Flexible Server. Search for the 'azure.extensions' parameter by selecting the Server Parameters tab in the side pane. Select the extensions that are to be allow-listed and click Save.
146
163
147
164
:::image type="content" source="./media/concepts-single-to-flexible/single-to-flex-azure-extensions.png" alt-text="Screenshot of PG extension support in the Flexible Server Azure portal." lightbox="./media/concepts-single-to-flexible/single-to-flex-azure-extensions.png":::
148
165
@@ -215,7 +232,7 @@ After you finish the prerequisites, migrate the data and schemas by using one of
215
232
- Batch similar-sized databases in a migration task.
216
233
- Perform large database migrations with one or two databases at a time to avoid source-side load and migration failures.
217
234
- Perform test migrations before migrating for production:
218
-
- Test migrations are an important for ensuring that you cover all aspects of the database migration, including application testing.
235
+
- Test migrations are an important for ensuring that you cover all aspects of the database migration, including application testing.
219
236
220
237
The best practice is to begin by running a migration entirely for testing purposes. After a newly started migration enters the continuous replication (CDC) phase with minimal lag, make your Flexible Server target the primary database server. Use that target for testing the application to ensure expected performance and results. If you're migrating to a higher Postgres version, test for application compatibility.
Copy file name to clipboardExpand all lines: articles/postgresql/migrate/how-to-migrate-single-to-flexible-cli.md
+11-16Lines changed: 11 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,34 +18,27 @@ This article shows you how to use the migration tool in the Azure CLI to migrate
18
18
>[!NOTE]
19
19
> The migration tool is in public preview.
20
20
21
-
## Prerequisites
21
+
## Getting started
22
22
23
-
1. If you're new to Microsoft Azure, [create an account](https://azure.microsoft.com/free/) to evaluate the offerings.
24
-
2. Register your subscription for Azure Database Migration Service. (If you've already done it, you can skip this step.)
23
+
1. If you're new to Microsoft Azure, [create an account](https://azure.microsoft.com/free/) to evaluate the offerings.
25
24
26
-
1. On the Azure portal, go to your subscription.
27
-
28
-
:::image type="content" source="./media/concepts-single-to-flexible/single-to-flex-cli-dms.png" alt-text="Screenshot of Azure Database Migration Service." lightbox="./media/concepts-single-to-flexible/single-to-flex-cli-dms.png":::
29
-
30
-
1. On the left menu, select **Resource Providers**. Search for **Microsoft.DataMigration**, and then select **Register**.
31
-
32
-
:::image type="content" source="./media/concepts-single-to-flexible/single-to-flex-cli-dms-register.png" alt-text="Screenshot of the Register button for Azure Database Migration Service." lightbox="./media/concepts-single-to-flexible/single-to-flex-cli-dms-register.png":::
33
-
34
-
3. Install the latest Azure CLI for your operating system from the [Azure CLI installation page](/cli/azure/install-azure-cli).
25
+
2. Install the latest Azure CLI for your operating system from the [Azure CLI installation page](/cli/azure/install-azure-cli).
35
26
36
27
If the Azure CLI is already installed, check the version by using the `az version` command. The version should be 2.28.0 or later to use the migration CLI commands. If not, [update your Azure CLI version](/cli/azure/update-azure-cli).
37
-
4. Run the `az login` command:
28
+
29
+
3. Run the `az login` command:
38
30
39
31
```bash
40
32
az login
41
33
```
42
34
43
-
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, see [this article](/cli/azure/authenticate-azure-cli).
44
-
5. Complete the prerequisites listed in [Migrate from Azure Database for PostgreSQL Single Server to Flexible Server](./concepts-single-to-flexible.md#prerequisites). You need them to get started with the migration tool.
35
+
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, see [this article](/cli/azure/authenticate-azure-cli).
36
+
37
+
4. Complete the prerequisites listed in [Migrate from Azure Database for PostgreSQL Single Server to Flexible Server](./concepts-single-to-flexible.md#migration-prerequisites). It is very important to complete the prerequisite steps before you initiate a migration using this tool.
45
38
46
39
## Migration CLI commands
47
40
48
-
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`.
41
+
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`.
49
42
50
43
For help with understanding the options associated with a command and with framing the right syntax, you can use the `help` parameter:
51
44
@@ -145,6 +138,8 @@ The structure of the JSON is:
145
138
}
146
139
147
140
```
141
+
>[!NOTE]
142
+
> Gentle reminder to complete the [prerequisites](./concepts-single-to-flexible.md#migration-prerequisites) before you execute **Create** in case it is not yet done. It is very important to complete the prerequisite steps in before you initiate a migration using this tool.
Copy file name to clipboardExpand all lines: articles/postgresql/migrate/how-to-migrate-single-to-flexible-portal.md
+7-13Lines changed: 7 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,20 +18,11 @@ This article shows you how to use the migration tool in the Azure portal to migr
18
18
>[!NOTE]
19
19
> The migration tool is in public preview.
20
20
21
-
## Prerequisites
21
+
## Getting started
22
22
23
-
1. If you're new to Microsoft Azure, [create an account](https://azure.microsoft.com/free/) to evaluate the offerings.
24
-
2. Register your subscription for Azure Database Migration Service:
23
+
1. If you're new to Microsoft Azure, [create an account](https://azure.microsoft.com/free/) to evaluate the offerings.
25
24
26
-
1. On the Azure portal, go to your subscription.
27
-
28
-
:::image type="content" source="./media/concepts-single-to-flexible/single-to-flex-azure-portal.png" alt-text="Screenshot of Azure portal subscription details." lightbox="./media/concepts-single-to-flexible/single-to-flex-azure-portal.png":::
29
-
30
-
1. On the left menu, select **Resource Providers**. Search for **Microsoft.DataMigration**, and then select **Register**.
31
-
32
-
:::image type="content" source="./media/concepts-single-to-flexible/single-to-flex-register-data-migration.png" alt-text="Screenshot of the Register button for Azure Data Migration Service." lightbox="./media/concepts-single-to-flexible/single-to-flex-register-data-migration.png":::
33
-
34
-
3. Complete the prerequisites listed in [Migrate from Azure Database for PostgreSQL Single Server to Flexible Server](./concepts-single-to-flexible.md#prerequisites). You need them to get started with the migration tool.
25
+
2. Complete the prerequisites listed in [Migrate from Azure Database for PostgreSQL Single Server to Flexible Server](./concepts-single-to-flexible.md#migration-prerequisites). It is very important to complete the prerequisite steps before you initiate a migration using this tool.
35
26
36
27
## Configure the migration task
37
28
@@ -83,7 +74,7 @@ Alternatively, you can initiate the migration process from the Azure Database fo
83
74
84
75
### Setup tab
85
76
86
-
The first tab is **Setup**. It has basic information about the migration and the list of prerequisites for getting started with migrations. These prerequisites are the same as the ones listed in the [Migrate from Azure Database for PostgreSQL Single Server to Flexible Server](./concepts-single-to-flexible.md) article.
77
+
The first tab is **Setup**. It has basic information about the migration and the list of prerequisites for getting started with migrations. These prerequisites are the same as the ones listed in the [Migrate from Azure Database for PostgreSQL Single Server to Flexible Server](./concepts-single-to-flexible.md#migration-prerequisites) article.
87
78
88
79
:::image type="content" source="./media/concepts-single-to-flexible/single-to-flex-setup.png" alt-text="Screenshot of the details belonging to Setup tab." lightbox="./media/concepts-single-to-flexible/single-to-flex-setup.png":::
89
80
@@ -153,6 +144,9 @@ After you choose a subnet, select the **Next** button.
153
144
154
145
### Review + create tab
155
146
147
+
>[!NOTE]
148
+
> Gentle reminder to complete the [prerequisites](./concepts-single-to-flexible.md#migration-prerequisites) before you click **Create** in case it is not yet complete.
149
+
156
150
The **Review + create** tab summarizes all the details for creating the migration. Review the details and select the **Create** button to start the migration.
157
151
158
152
:::image type="content" source="./media/concepts-single-to-flexible/single-to-flex-migration-review.png" alt-text="Screenshot of details to review for the migration." lightbox="./media/concepts-single-to-flexible/single-to-flex-migration-review.png":::
0 commit comments