Skip to content

Commit f0051c1

Browse files
authored
Merge pull request #260957 from hariramt/task/OnlineCLIUpdate
Added logical replication set up
2 parents 46e8a46 + c33f16a commit f0051c1

File tree

2 files changed

+23
-17
lines changed

2 files changed

+23
-17
lines changed

articles/postgresql/migrate/how-to-migrate-single-to-flexible-cli.md

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -115,23 +115,6 @@ For example:
115115
az postgres flexible-server migration create --subscription 11111111-1111-1111-1111-111111111111 --resource-group my-learning-rg --name myflexibleserver --migration-name migration1 --properties "C:\Users\Administrator\Documents\migrationBody.JSON" --migration-mode offline
116116
```
117117

118-
> [!NOTE]
119-
> The Single to Flex Migration tool is available in all Azure regions and currently supports **Offline** migrations. Support for **Online** migrations is currently available in select regions - India Central, India South, Australia Southeast and South East Asia.
120-
121-
If **Online** migration is selected, it requires Logical replication to be turned on in the source Single server. If it isn't turned on, the migration tool automatically turns on logical replication at the source Single server. Replication can also be set up manually at the source using the below command. Note that either approach of turning on logical replication restarts the source Single server.
122-
123-
For example:
124-
125-
```azurecli-interactive
126-
az postgres flexible-server migration update --subscription 11111111-1111-1111-1111-111111111111 --resource-group my-learning-rg --name myflexibleserver --migration-name CLIMigrationExample --setup-replication
127-
```
128-
129-
To perform Online migration in any of the above regions, use:
130-
131-
```azurecli-interactive
132-
az postgres flexible-server migration create --subscription 11111111-1111-1111-1111-111111111111 --resource-group my-learning-rg --name myflexibleserver --migration-name migration1 --properties "C:\Users\Administrator\Documents\migrationBody.JSON" --migration-mode online
133-
```
134-
135118
The `migration-name` argument used in the `create` command is used in other CLI commands, such as `update`, `delete`, and `show.` In all those commands, it uniquely identifies the migration attempt in the corresponding actions.
136119

137120
Finally, the `create` command needs a JSON file to be passed as part of its `properties` argument.
@@ -186,6 +169,29 @@ Note these important points for the command response:
186169
- The time that the `Migrating Data` substate takes to finish depends on the size of databases that are migrated.
187170
- 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.
188171

172+
> [!NOTE]
173+
> The Single to Flex Migration tool is available in all Azure regions and currently supports **Offline** migrations. Support for **Online** migrations is currently available in select regions - India Central, India South, Australia Southeast and South East Asia.
174+
175+
#### Setup replication
176+
177+
If **Online** migration is selected, it requires Logical replication to be turned on in the source Single server. If it isn't turned on, the migration tool automatically turns on logical replication at the source Single server when the `SetupLogicalReplicationOnSourceDBIfNeeded` parameter is passed with a value of `true` in the accompanying JSON file. Replication can also be set up manually at the source after starting the migration, using the below command. Note that either approach of turning on logical replication restarts the source Single server.
178+
179+
For example:
180+
181+
```azurecli-interactive
182+
az postgres flexible-server migration update --subscription 11111111-1111-1111-1111-111111111111 --resource-group my-learning-rg --name myflexibleserver --migration-name CLIMigrationExample --setup-replication
183+
```
184+
185+
This command is required to advance the migration when the flexible server is waiting in the `WaitingForLogicalReplicationSetupRequestOnSourceDB` state.
186+
187+
:::image type="content" source="./media/concepts-single-to-flexible/az-postgres-flexible-server-migration-logical-replication.png" alt-text="Screenshot of logical replication set up." lightbox="./media/concepts-single-to-flexible/az-postgres-flexible-server-migration-logical-replication.png":::
188+
189+
To perform Online migration in any of the above regions, use:
190+
191+
```azurecli-interactive
192+
az postgres flexible-server migration create --subscription 11111111-1111-1111-1111-111111111111 --resource-group my-learning-rg --name myflexibleserver --migration-name migration1 --properties "C:\Users\Administrator\Documents\migrationBody.JSON" --migration-mode online
193+
```
194+
189195
>[!NOTE]
190196
> Gentle reminder to [allowlist the extensions](./concepts-single-to-flexible.md#allowlist-required-extensions) before you execute **Create** in case it is not yet done. It's important to allow-list the extensions before you initiate a migration using this tool.
191197
Loading

0 commit comments

Comments
 (0)