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
Copy file name to clipboardExpand all lines: articles/postgresql/migrate/how-to-migrate-single-to-flexible-cli.md
+14-12Lines changed: 14 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -96,6 +96,7 @@ az postgres flexible-server migration create [--subscription]
96
96
[--resource-group]
97
97
[--name]
98
98
[--migration-name]
99
+
[--migration-mode]
99
100
[--properties]
100
101
```
101
102
@@ -105,12 +106,13 @@ az postgres flexible-server migration create [--subscription]
105
106
|`resource-group`| Resource group of the Flexible Server target. |
106
107
|`name`| Name of the Flexible Server target. |
107
108
|`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. |
108
110
|`properties`| Absolute path to a JSON file that has the information about the Single Server source. |
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:
122
124
```bash
123
125
{
124
126
"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>",
126
128
127
-
"SecretParameters": {
128
-
"AdminCredentials":
129
+
"secretParameters": {
130
+
"adminCredentials":
129
131
{
130
-
"SourceServerPassword": "<password>",
131
-
"TargetServerPassword": "<password>"
132
+
"sourceServerPassword": "<password>",
133
+
"targetServerPassword": "<password>"
132
134
}
133
135
},
134
136
135
-
"DBsToMigrate":
137
+
"dbsToMigrate":
136
138
[
137
139
"<db1>","<db2>"
138
140
],
139
141
140
-
"OverwriteDBsInTarget":"true"
142
+
"overwriteDbsInTarget":"true"
141
143
142
144
}
143
145
@@ -149,10 +151,10 @@ The `create` parameters that go into the json file format are as shown below:
149
151
150
152
| Parameter | Type | Description |
151
153
| ---- | ---- | ---- |
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. |
156
158
|`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. |
157
159
|`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. |
158
160
|`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