Showing posts with label Sitecore Tools. Show all posts
Showing posts with label Sitecore Tools. Show all posts

Wednesday, 3 September 2025

Migrating Content and Users with the XM to XM Cloud Migration Tool CLI

September 03, 2025 0

In my previous blog, I discussed how we can migrate content, media, and users using the XM to XM Cloud Migration Tool – GUI option.

In today’s blog, I’ll walk you through the CLI (Command Line Interface) option, which provides the same functionality but is also ideal for scripting and automation.

Step 1: Configuration Setup

It is very important to use the same configuration settings as in the GUI version, stored in the appsettings.json file.
If needed, you can adjust some values manually. You can also refer to a sample appsettings.json file here.

Key Configurations

RAIFs Configuration

The XM to XM Cloud Migration Tool transfers content and media via RAIFs (batches).

  • The default values in appsettings.json are balanced for most customers.

  • ItemsPerRaif defines the number of items per transfer.

    • Too low → creates too many RAIF files.

    • Too high → may impact transfer speed.

  • MediaSizeLimit defines the maximum media size per RAIF.

    • Must be a long value.


Content Migration Configuration

Ensure proper settings for source and target configuration before executing migration.


Step 2: Explore CLI Options

Navigate to the folder containing the console app and run:

.\XMMigration.exe --help

This will display a list of all available commands.


Step 3: Migrate Content

Run the following command to migrate content:

.\XMMigration.exe content



Step 4: Migrate Users

You have multiple options for migrating users:

  • Retrieve domains from the source instance

    .\XMMigration.exe users --retrieve-domains

  • Migrate users by passing domains (comma separated)

    .\XMMigration.exe users --migrate-userdomains sitecore


This may ask to login to XM Cloud-


Key Points to Remember

  1. This tool can only be used for “as-is” migration.

    • Content cannot be transformed.

    • Content templates cannot be updated.

  2. Templates must be migrated first, followed by content.

  3. Only media items stored in the database can be migrated.

  4. Best suited for migrating a large volume of legacy content to XM Cloud.

Conclusion

The XM to XM Cloud Migration Tool’s CLI option is powerful for automation and large-scale migrations. With proper configuration and sequence, it ensures a smooth transfer of content, media, and users to XM Cloud.

Monday, 25 August 2025

Migrating from Sitecore XM to XM Cloud Using the Migration Tool GUI

August 25, 2025 0

 



Sitecore XM to XM Cloud Migration tool helps to move content, media and user data from a on-prem Sitecore Experience Manager (XM) instance to a target XM Cloud environment. It is middleware that simplifies the task of entering and selecting data, and orchestrating the migration. The tool is available in both a Graphical User Interface (GUI) tool, and a Command Line Interface (CLI) comprising operations that you can embed into your own tooling.

In my previous blog, I discussed about complete analysis a developer should perform before migrating from Sitecore XP/XM to XM Cloud. In our today's blog, I'll discuss about the Sitecore XM to XM Cloud Migration tool Graphical User Interface features and process.

The current version is v2.1.71. Current supported Sitecore XM versions are 9.1+ and 10.0+

Key Features

  • Dual support for GUI and CLI.

  • TreeView selection for choosing content and media items.

  • Media migration via CDN or on-premise MSSQL database binaries.

  • User migration directly into the Sitecore Cloud Portal.

Prerequisites

Before starting, ensure you have:

  • A Sitecore XM on-premise instance with content, media, or users.

  • A fresh XM Cloud environment.

  • Compatible OS: Windows Server 2022, Windows 10 (64-bit), or Windows 11 (64-bit).

What’s Inside the ZIP Package?

The migration tool’s ZIP file includes:

  • appsettings.json – configuration file.

  • Executable (.exe) to run the application.

  • SitecorePackage.zip – required for setup.

  • Logs folder.

  • README.md – highly recommended to read before starting.

  • Docs folder with details on configuration, dependencies, FAQs, and known issues.



Initial Setup

  1. Upload and install the SitecorePackage.zip file into your on-prem XM application.



  2. After installation, a new _MigrationHarness folder will appear in your XM root directory.


  3. Update the Web.config file to include specific <assemblyBinding> entries (for assemblies like protobuf-net, System.Buffers, System.Memory, etc.).

    <probing privatePath="_MigrationHarness/bin" />

              <dependentAssembly>

                <assemblyIdentity name="protobuf-net" publicKeyToken="257b51d87d2e4d67" />

                <codeBase version="2.4.0.0" href="_MigrationHarness/bin/protobuf-net.dll" />

              </dependentAssembly>

              <dependentAssembly>

                <assemblyIdentity name="Microsoft.Extensions.Logging.Abstractions" publicKeyToken="adb9793829ddae60" />

                <codeBase version="6.0.0.0" href="_MigrationHarness/bin/Microsoft.Extensions.Logging.Abstractions.dll" />

              </dependentAssembly>

              <dependentAssembly>

                <assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" />

                <codeBase version="4.0.2.0" href="_MigrationHarness/bin/System.Buffers.dll" />

              </dependentAssembly>

              <dependentAssembly>

                <assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" />

                <codeBase version="4.0.1.2" href="_MigrationHarness/bin/System.Memory.dll" />

                <bindingRedirect oldVersion="4.0.1.1" newVersion="4.0.1.2" />

              </dependentAssembly>

              <dependentAssembly>

                <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" />

                <codeBase version="6.0.0.0" href="_MigrationHarness/bin/System.Runtime.CompilerServices.Unsafe.dll" />

                <bindingRedirect oldVersion="4.0.4.1" newVersion="6.0.0.0" />

              </dependentAssembly>


  4. Adjust the appsettings.json file if needed, especially the line:

    "SitecoreCmMigrationHandlerFileRelativePath": "_MigrationHarness/MigrationHandler.ashx"

Running the Migration GUI

  1. Launch XMMigrationGUI.exe and select the data types to migrate (Content, Media, and Users if required).


  2. Click on Next and you can see the Source configuration- Sitecore XM/XP on premises. 

    Please provide CM Base URL, Username and Password.



  3. Click on Next button and provide the XM Cloud settings. Please follow the instruction to find the specific data for each fields.




  4. You can get the XM Cloud Envionment related information from the enviornment (in our case Development) details section.



  5. If credentials are not already available, create new Cloud Portal credentials.


  6. Use the Content Tree view to select the items and Media you wish to migrate.


  7. Click on Next, and provide the credential to choose the users you want to migrate.


  8. Click the Next button and configure the Users Migration Target Settings. Click the Connect to Sitecore Cloud button and follow the instructions. A new browser window will be opened where you should log in as a Sitecore Portal User and confirm the code that you see in the Migration tool.


  9. As the last step for users configuration, choose an environment where you would like to invite users under the chosen organization.



  10. Review the migration summary and start the process.


  11. Once complete, your content, media, and users will be successfully migrated to your XM Cloud environment.

    On-Prem XM :



    XM Cloud



Conclusion

The Sitecore XM to XM Cloud Migration Tool (GUI) provides a guided approach for migrating data from on-premise to the cloud. By supporting both content and user migration, it eliminates much of the complexity involved in traditional migration methods. Whether you’re performing a quick lift-and-shift or preparing for a larger digital transformation, this tool ensures a smooth, reliable, and efficient migration experience.

References

1. XM Cloud Tools and Resources