Merging separate KX13 instances into XbyK during migration

Hi everyone,

Our team is kicking off a migration project from KX13 to XbyK where the source project.. are actually 2 separate instances of KX13 with multiple sites (each "site" is just a country-specific version of same business). Becuase each country has mostly unique content these were created in the past as multi-site rather than multi-lingual.

Codebase of both KX13 instances is mostly the same (originally cloned) with some minor tweaks here and there. And now the client wants to consolidate both into a single XbyK database AND migrate and merge content from both sources at the same time.

Both instances are in active content production, so we can't migrate once and then freeze content until the end of the project. Content migration should happen multiple times during this project.

AFAIK, the current migration tool does not cover this exact scenario so I thought about running the process like this:

  1. Migrate source 1 to XbyK
  2. Migrate source 2 to the same XbyK instance
  3. Identify collisions and problems and resolve them as customizations of source 2 migration
  4. Repeat from 1 until migrated content is stable

I wonder if someone from the community has already dealt with a similar setup and can share their approach and pitfalls?

Regards, Dmitry

Tags:
Content modeling Migration / upgrade

Answers

Accepted answer

Hi mate!

Sorry, coming late to this party.

We've just done something pretty similar. Three KX13 instances (one of them multi-site) consolidated into a single XbyK instance with 6 channels. The sources were live the whole time, so we migrated content more than once. We also had a channel descoped at the last minute, which was a good test of how independent our runs were.

Your loop is close to what we did. We mapped every source to an agreed target model up front, rather than resolving collisions after the second source runs. We found it much easier to define the target model first, including any shared references, then map both instances to it. We also had each channel take content from one source only. With country sites that should happen anyway, so most of your collisions will be in the shared stuff, e.g. content types, taxonomies, reusable items, media and users.

Prep is most of the work

We mapped each source instance to the target at template, widget, component and URL level, and got the client to review and approve it. Once that was locked, Claude and KentiCopilot ate it up. We used a patched fork of the Universal Migration Toolkit (UMT), called as a library from our own migration project. It runs as a command against the site's DLL, and it tracks every field it writes so reruns never overwrite an editor's changes.

Things to watch out for

  • Cloned codebases drift. "Mostly the same" usually means the same class names with different fields. Diff the class schemas early. If a type is identical in both, one mapping can handle it using the class name as a parameter. Otherwise give it its own.
  • Reruns need to be idempotent. Key everything on something stable from the source. We'd run it twice and expect the second run to report zero writes. If it didn't, something wasn't keyed properly.
  • Don't overwrite editors. We store a hash of each field's source value and the value we wrote. On a rerun, if the stored value no longer matches, an editor has changed it and we leave it alone. Page Builder is checked per widget. We looked at using a dedicated import user instead, but anything else that edits content (for us, a spreadsheet import) breaks that check.
  • Dedupe upfront only if the key is consistent across runs. We deduped people by email within each workspace. Media had no reliable key, so we brought it all across and cleaned up duplicates after.
  • Workspaces help a lot. Each source site's content went into its own channel's workspace. Duplicates stay inside one workspace, which makes the cleanup easier, and anything genuinely shared gets moved to a shared workspace after.
  • Name migrated content so you can find it. Ours are Mig{Kind}{KX13 GUID}, e.g. MigTenant…, and the GUIDs are generated the same way every time, so every environment gets the same ones. If something looks wrong after a run, you can trace it straight back to the KX13 node.
  • Linked nodes. One record per tree node gives you hundreds of empty records. Make the originals reusable items and the links references.
  • Page builder JSON doesn't come across. Decide early whether you're converting widgets or rebuilding pages. We rebuilt, and patched content in a second pass.
  • Tie each run to a code and model version. Our import refuses a package built against a different content model or different migration code. Strict, but it stopped a lot of head scratching.
  • Some content might not need migrating. Some structured content was expected to change constantly (e.g. property availability), so we moved it to a spreadsheet upload in the admin to allow the client to keep it up to date independently. Relationships on related content still work because the import keys on the IDs.
  • Build redirects from live URLs, not the tree. Watch for Kentico collision suffixes too. We had 25, including a homepage.
  • Automate your checks after every run. Sitemap URLs return 200, redirect rules pass, media resolves.
  • Keep each source as its own package. That's why dropping the descoped channel was easy.

Good luck with it, and shout if you want more detail on any of this.

To response this discussion, you have to login first.