Skip to main content

Migrate Microsoft 365 data

This section describes how to migrate Microsoft 365 data from version 9.6 to 9.6.2 of Snow License Manager. To complete the migration successfully, read this section and section Microsoft 365 data model carefully, and follow the steps.

EventStore

caution

From Snow License Manager 9.14, the EventStore is decommissioned completely as a service. To not lose any historic data, you are advised to run an aggregation of the Microsoft 365 integration connector, at least once, while you are still on any version between 9.6.2 and 9.12.1.

Microsoft 365 event-sourced data is saved in the Snow License Manager database in the ew schema. For more information about how event data is stored, see SnowEventWarehouse.

The default folder for migration to Snow License Manager 9.6.2 is the Database subfolder of the %Programdata%\SnowSoftware\LicenseManager\EventStore path.

In Snow License Manager 9.5.1 to 9.6.1, there were quality issues with large quantities of Microsoft 365 data. Therefore, the migration job will by default migrate the EventStore (v2) that was available in Snow License Manager 9.4.1 and previous versions. If you recently have set up the Microsoft 365 integration connector or did not encounter any Microsoft 365 issues in Snow License Manager 9.5.1, you can choose to migrate EventStore (v3). Note also that data lost between the upgrade from Snow License Manager 9.5.1 to 9.6.2 will not be available from the start.

After the migration, the Database and o365 folders are kept as a backup but are not used by the system. Do not remove the EventStore files before the migration is completed, because the files contain historical data.

Migrate the subfolder o365 instead of the default folder

To migrate the subfolder o365 instead of migrating the default folder, perform the following steps:

  1. Stop the service SnowLicenseManagerOffice365Service.

  2. Navigate to the installation folder of the service, C:\Program Files\Snow Software\Snow License Manager\Services\Office365, and open the file appsettings.json.

    tip

    The application Notepad can be used to edit the file.

  3. Change the setting UseOldEventStore to false.

  4. Save the file.

  5. Start the service SnowLicenseManagerOffice365Service.

SQL database changes

The database schema o365 changes when upgrading to Snow License Manager 9.6.2 and the data in o365 schema tables is erased. For details on the schema changes, see Schema changes.

Preparations

Before the upgrade, verify that no data aggregation from Snow Integration Manager is running or scheduled. There is no need to take a backup of the EventStore.

Data migration

Snow License Manager is upgraded to version 9.6.2 through the Snow Update Service. As soon as the upgrade is completed, the ew and o365 schemas are recreated in Snow License Manager MSSQL database and the data migration process is initiated.

The progress of the data migration can be seen in the Office 365 logs. It is not possible to see in Snow Update Service whether the data migration was successful or not. Snow Update Service will only display when the upgrade to version 9.6.2 has completed, and then trigger the start of data migration.

note

The migration time depends on the Microsoft 365 data size and the number of historical events. You cannot see any Microsoft 365 data in the Snow License Manager user interface before the migration has completed, so you should plan for this if you have a large EventStore database. The Snow License Manager application is still available during the migration.

The migration can run in parallel with the data update job, but the migration will be slower if it is run in parallel.

Track the progress of the data migration

Read the Office 365 log to track the data migration progress and verify its completion. The following texts will appear in the log in this given order:

  1. Microsoft.EntityFrameworkCore.Migrations and Applying migration

    In this phase the new o365 data schema is applied to the SQL database.

  2. Successfully connected to EventStore

    note

    If the EventStore is not started, there will be a log message stating that a connection to the EventStore could not be made. In that case, start the SnowLicenseManagerEventstoreService and also restart the SnowLicenseManagerOffice365Service.

  3. Eventstore events Vn migration required xyz events to migrate

    where:

    • Vn depends on chosen EventStore folder to migrate.

      • V2 - migrate Database folder
      • V3 - migrate o365 folder
    • xyz is the number of events to migrate.

  4. The progress of the migration in percentage.

  5. Migration completed

    This means that all EventStore data has been migrated to the ew and o365 database tables. After this, Office365 compiles user linking, user activities mapping, and read models.

  6. Users Per subscription Plan ReadModel construction is completed

    This is most likely the last log message, since the Users per Subscription Plan ReadModel typically is the largest one and might be the last to complete.

Run another Snow Integration Manager aggregation

After the migration and the ReadModels have completed, run a new Snow Integration Manager aggregation to ensure that all links between users and subscriptions plans are updated correctly.

Differences in Snow License Manager after the migration

The data displayed in Snow License Manager may not be identical before and after the data migration, since changes may occur in the Microsoft 365 portal between the Snow Integration Manager aggregations. After the migration to Snow License Manager 9.6.2, specifically note the following:

  • Data aggregated from Snow Integration Manager versions older than 5.15 will not be visible in the Overview graph.
  • The Total users count only includes users with an assigned subscription plan.
  • The charts in the user interface are now only reflecting data until the last import.
  • If unknown subscription plans are present, notify Flexera Support.