Migrating Content and Users with the XM to XM Cloud Migration Tool CLI
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
Key Points to Remember
-
This tool can only be used for “as-is” migration.
-
Content cannot be transformed.
-
Content templates cannot be updated.
-
-
Templates must be migrated first, followed by content.
-
Only media items stored in the database can be migrated.
-
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.
Comments
Post a Comment