Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/azure-cli/azure/cli/command_modules/dms/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,10 @@
},
// Optional setting to set the source server read only.
"make_source_server_read_only": "true|false",
// Optional setting to enable consistent backup. True by default for the sync migration, and false otherwise.
// Optional setting to enable consistent backup. True by default for the sync migration, unless lockless is enabled.
"enable_consistent_backup": "true|false",
// Optional setting to enable lockless snapshot.
"enable_consistent_backup_without_locks": "true|false",
// Optional. If true, all view definitions will be migrated in the selected databases.
"migrate_all_views": "true|false",
// Optional. If true, all trigger definitions will be migrated in the selected databases.
Expand Down
10 changes: 3 additions & 7 deletions src/azure-cli/azure/cli/command_modules/dms/scenario_inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ def get_migrate_mysql_to_azuredbformysql_sync_input(database_options_json,
target_connection_info,
has_schema_migration_options=True,
has_consistent_snapshot_options=True,
requires_consistent_snapshot=True,
has_binlog_position=False)


Expand All @@ -82,7 +81,6 @@ def get_migrate_mysql_to_azuredbformysql_offline_input(database_options_json,
target_connection_info,
has_schema_migration_options=True,
has_consistent_snapshot_options=True,
requires_consistent_snapshot=False,
has_binlog_position=False)


Expand All @@ -94,7 +92,6 @@ def get_migrate_mysql_to_azuredbformysql_cdc_input(database_options_json,
target_connection_info,
has_schema_migration_options=False,
has_consistent_snapshot_options=False,
requires_consistent_snapshot=False,
has_binlog_position=True)


Expand All @@ -103,7 +100,6 @@ def get_migrate_mysql_to_azuredbformysql_input(database_options_json,
target_connection_info,
has_schema_migration_options: bool,
has_consistent_snapshot_options: bool,
requires_consistent_snapshot: bool,
has_binlog_position: bool):
database_options = []
migration_level_settings = {}
Expand Down Expand Up @@ -140,12 +136,12 @@ def get_migrate_mysql_to_azuredbformysql_input(database_options_json,
if not isinstance(migration_level_settings, dict):
raise ValidationError('migration_level_settings should be a dictionary')

if requires_consistent_snapshot:
migration_level_settings['enableConsistentBackup'] = 'true'
elif has_consistent_snapshot_options:
if has_consistent_snapshot_options:
make_source_server_read_only = database_options_json.get('make_source_server_read_only', False)
set_optional(migration_level_settings, 'enableConsistentBackup', database_options_json,
'enable_consistent_backup')
set_optional(migration_level_settings, 'enableConsistentBackupWithoutLocks', database_options_json,
'enable_consistent_backup_without_locks')
Comment thread
temandr marked this conversation as resolved.

if has_schema_migration_options:
extract_schema_migration_options(migration_properties, database_options_json)
Expand Down