Skip to content

Commit a034133

Browse files
Merge pull request #242934 from shriram-muthukrishnan/azureclifixes
changes to match swagger spec
2 parents c07c690 + f620f88 commit a034133

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

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

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ az postgres flexible-server migration create [--subscription]
9696
[--resource-group]
9797
[--name]
9898
[--migration-name]
99+
[--migration-mode]
99100
[--properties]
100101
```
101102

@@ -105,12 +106,13 @@ az postgres flexible-server migration create [--subscription]
105106
|`resource-group` | Resource group of the Flexible Server target. |
106107
|`name` | Name of the Flexible Server target. |
107108
|`migration-name` | Unique identifier to migrations attempted to Flexible Server. This field accepts only alphanumeric characters and does not accept any special characters, except a hyphen (`-`). The name can't start with `-`, and no two migrations to a Flexible Server target can have the same name. |
109+
|`migration-mode` | This is an optional parameter. Default value: Offline. Offline migration involves copying of your source databases at a point in time, to your target server. |
108110
|`properties` | Absolute path to a JSON file that has the information about the Single Server source. |
109111

110112
For example:
111113

112114
```azurecli-interactive
113-
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"
115+
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
114116
```
115117

116118
The `migration-name` argument used in the `create` command will be 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.
@@ -122,22 +124,22 @@ The structure of the JSON is:
122124
```bash
123125
{
124126
"properties": {
125-
"SourceDBServerResourceId":"/subscriptions/<subscriptionid>/resourceGroups/<src_ rg_name>/providers/Microsoft.DBforPostgreSQL/servers/<source server name>",
127+
"sourceDbServerResourceId":"/subscriptions/<subscriptionid>/resourceGroups/<src_ rg_name>/providers/Microsoft.DBforPostgreSQL/servers/<source server name>",
126128

127-
"SecretParameters": {
128-
"AdminCredentials":
129+
"secretParameters": {
130+
"adminCredentials":
129131
{
130-
"SourceServerPassword": "<password>",
131-
"TargetServerPassword": "<password>"
132+
"sourceServerPassword": "<password>",
133+
"targetServerPassword": "<password>"
132134
}
133135
},
134136

135-
"DBsToMigrate":
137+
"dbsToMigrate":
136138
[
137139
"<db1>","<db2>"
138140
],
139141

140-
"OverwriteDBsInTarget":"true"
142+
"overwriteDbsInTarget":"true"
141143

142144
}
143145

@@ -149,10 +151,10 @@ The `create` parameters that go into the json file format are as shown below:
149151

150152
| Parameter | Type | Description |
151153
| ---- | ---- | ---- |
152-
| `SourceDBServerResourceId` | Required | This parameter is the resource ID of the Single Server source and is mandatory. |
153-
| `SecretParameters` | Required | This parameter lists passwords for admin users for both the Single Server source and the Flexible Server target. These passwords help to authenticate against the source and target servers.
154-
| `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. |
155-
| `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. |
154+
| `sourceDbServerResourceId` | Required | This parameter is the resource ID of the Single Server source and is mandatory. |
155+
| `secretParameters` | Required | This parameter lists passwords for admin users for both the Single Server source and the Flexible Server target. These passwords help to authenticate against the source and target servers.
156+
| `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. |
157+
| `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. |
156158
| `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. |
157159
| `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. |
158160
| `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. |

0 commit comments

Comments
 (0)