az postgres flexible-server migration

Manage migration workflows for PostgreSQL Flexible Servers.

Commands

az postgres flexible-server migration check-name-availability

Checks if the provided migration-name can be used.

az postgres flexible-server migration create

Create a new migration workflow for a flexible server.

az postgres flexible-server migration delete

Delete a specific migration.

az postgres flexible-server migration list

List the migrations of a flexible server.

az postgres flexible-server migration show

Get the details of a specific migration.

az postgres flexible-server migration update

Update a specific migration.

az postgres flexible-server migration check-name-availability

Checks if the provided migration-name can be used.

az postgres flexible-server migration check-name-availability --migration-name
                                                              [--ids]
                                                              [--name]
                                                              [--resource-group]

Examples

Check if the migration-name provided is available for your migration workflow.

az postgres flexible-server migration check-name-availability --subscription xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --resource-group testGroup --name testserver --migration-name xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Required Parameters

--migration-name

Name of the migration.

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

Migration target server name.

--resource-group -g

Resource Group Name of the migration target server.

az postgres flexible-server migration create

Create a new migration workflow for a flexible server.

az postgres flexible-server migration create --name
                                             --properties
                                             --resource-group
                                             [--migration-name]

Examples

Start a migration workflow on the target server identified by the parameters. The configurations of the migration should be specified in the migrationConfig.json file.

az postgres flexible-server migration create --subscription xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --resource-group testGroup --name testserver --properties "migrationConfig.json"

Required Parameters

--name -n

Migration target server name.

--properties -b

Request properties. Use double or no quotes to pass in filepath as argument.

--resource-group -g

Resource Group Name of the migration target server.

Optional Parameters

--migration-name

Name of the migration.

az postgres flexible-server migration delete

Delete a specific migration.

az postgres flexible-server migration delete --migration-name
                                             [--ids]
                                             [--name]
                                             [--resource-group]
                                             [--yes]

Examples

Cancel/delete the migration workflow. The migration workflows can be canceled/deleted at any point.

az postgres flexible-server migration delete --subscription xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --resource-group testGroup --name testserver --migration-name xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Required Parameters

--migration-name

Name of the migration.

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

Migration target server name.

--resource-group -g

Resource Group Name of the migration target server.

--yes -y

Do not prompt for confirmation.

az postgres flexible-server migration list

List the migrations of a flexible server.

az postgres flexible-server migration list [--filter]
                                           [--ids]
                                           [--name]
                                           [--resource-group]

Examples

List the currently active migrations of a target flexible server.

az postgres flexible-server migration list --subscription xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --resource-group testGroup --name testserver --filter Active

List all (Active/Completed) migrations of a target flexible server.

az postgres flexible-server migration list --subscription xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --resource-group testGroup --name testserver --filter All

Optional Parameters

--filter

Indicate whether all the migrations or just the Active migrations are returned. Active is the default. Valid values are: Active, All.

default value: Active
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

Migration target server name.

--resource-group -g

Resource Group Name of the migration target server.

az postgres flexible-server migration show

Get the details of a specific migration.

az postgres flexible-server migration show --migration-name
                                           [--ids]
                                           [--level]
                                           [--name]
                                           [--resource-group]

Examples

Get the details of a specific migration of a target flexible server.

az postgres flexible-server migration show --subscription xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --resource-group testGroup --name testserver --migration-name xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Required Parameters

--migration-name

Name of the migration.

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--level

Specify the level of migration details requested. Valid values are Active and All. Active is the default.

default value: Default
--name -n

Migration target server name.

--resource-group -g

Resource Group Name of the migration target server.

az postgres flexible-server migration update

Update a specific migration.

az postgres flexible-server migration update --migration-name
                                             [--db-names]
                                             [--ids]
                                             [--name]
                                             [--overwrite-dbs]
                                             [--resource-group]
                                             [--setup-replication]
                                             [--start-data-migration]

Examples

Allow the migration workflow to setup logical replication on the source. Note that this command will restart the source server.

az postgres flexible-server migration update --subscription xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --resource-group testGroup --name testserver --migration-name xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --setup-replication

Space-separated list of DBs to migrate. A minimum of 1 and a maximum of 8 DBs can be specified. You can migrate more DBs concurrently using additional migrations. Note that each additional DB affects the performance of the source server.

az postgres flexible-server migration update --subscription xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --resource-group testGroup --name testserver --migration-name xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --db-names db1 db2

Allow the migration workflow to overwrite the DB on the target.

az postgres flexible-server migration update --subscription xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --resource-group testGroup --name testserver --migration-name xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --overwrite-dbs

This command helps in starting the data migration immediately between the source and target. Any migration scheduled for a future date and time will be cancelled.

az postgres flexible-server migration update --subscription xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --resource-group testGroup --name testserver --migration-name xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --start-data-migration

Required Parameters

--migration-name

Name of the migration.

Optional Parameters

--db-names --dbs

Space-separated list of DBs to migrate. A minimum of 1 and a maximum of 8 DBs can be specified. You can migrate more DBs concurrently using additional migrations. Note that each additional DB affects the performance of the source server.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

Migration target server name.

--overwrite-dbs

Allow the migration workflow to overwrite the DB on the target.

--resource-group -g

Resource Group Name of the migration target server.

--setup-replication

Allow the migration workflow to setup logical replication on the source. Note that this command will restart the source server.

--start-data-migration

Reschedule the data migration to start right now.