Business Central from On-Premise to Cloud APIs

Business Central Cloud Migration Scenario

It’s possible to use APIs to perform the data migration in automatic mode (Silent Mode).

All existing functionalities usable via pages are available, through powershell scripts it is possible to launch the migration in Silent Mode.

Data Migration Scenario

Microsoft has created some Powershell Scripts for:
  • Automate already existing manual procedures managed through pages
  • Start the data migration process
  • Migrate selected companies from BC On-premise (and from Docker) to the Cloud
  • Use the «Azure MIR – Microsoft Integration Runtime» bridge to transfer data
  • Disable replication at the end of migration

Note:

  • Batch with blocks data migration can be launched
  • Custom tables can be excluded from replication
  • You can disable replication at the end of the migration

You need at least a BC14 with the same APPs installed

APIs for managing Cloud Migration:

The available ready-to use APIs are:

Setup APIs:

  • Setup Cloud Migration (Wizard)
  • Company Management (choose companies from On-Premise)
  • Define table mapping for custom tables

Migration Management:

  • Replicate data (START)
  • Track progress (replicated, pending, failed tables)
  • Start upgrade
  • Disable cloud migration (END)
Data replication schema

MIR (Microsoft Integration Runtime) and Data Factory

Data migration takes place via the MIR bridge, however it is not necessary to create manually any Azure Data Factory, it is managed independently without going through the Azure portal.

Creare un runtime di integrazione self-hosted

Poweshell Scripts

Cloud MIgation Script

You can download the scripts from here:

BCTech/samples/CloudMigration at master · microsoft/BCTech (github.com)

Or from OneDrive

Powershell Script – «CloudMigrationE2E»

Main functions:

  • function Setup-CloudMigration
  • function Get-AADToken
  • function Create-CompaniesInBatches
  • function Move-CompaniesInBatches
  • function Get-OnPremCompanies
  • function Get-Companies
  • function Run-Replication
  • function Run-DataUpgrade
  • function Disable-CloudMigration
  • function Run-CloudDataMigrationE2E» 🡪 runs data migration
How to exclude Custom Tables:

To not transfer a custom table: –ReplicateData = false

Immagine che contiene testo

Descrizione generata automaticamente

Configuration Example

Immagine che contiene testo

Descrizione generata automaticamente

Start DataMigration

  • Run-CloudMigrationE2E (params)

Immagine che contiene testo, schermo

Descrizione generata automaticamente

LIMITS

MICROSOFT TEST CASE SCENARIO

Run-CloudDataMigrationE2E function

function Run-CloudMigrationE2E

(

[string] $UserName = $script:CurrentUserName,

[string] $Password = $script:CurrentPassword,

[ValidateSet("DynamicsBCLast","DynamicsBC","DynamicsGP")]

[string] $ProductId = "DynamicsBCLast",

[ValidateSet("SQLServer","AzureSQL")]

[string] $SqlServerType = 'SQLServer',

[switch] $SkipSetup,

[switch] $SetupAutomatically,

[string] $SqlConnectionString,

[System.Collections.ArrayList] $ExcludedCompanies = [System.Collections.ArrayList]::new(),

[string] $Version = "v1.0"

)

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.