XWiki migration: preserving users, permissions and page metadata (without history)

Hi everyone,

I’m looking for advice on migrating data between XWiki instances.

We’ve been using XWiki for several years. During this time we:

  • upgraded across multiple versions,

  • tested various extensions,

  • and eventually accumulated quite a few dependency issues that now make further upgrades difficult.

We’ve decided to set up a new “clean” instance and migrate the following:

  • all spaces (with content),

  • all users,

  • access rights (page / space permissions).

The goal is to start fresh with only the necessary extensions and updated security policies.

Important clarification:

  • we do NOT need full history,

  • we only need to preserve:

    • the original creator / last editor,

    • the original creation and last modification timestamps.

Problem:
The standard export (XAR / space export) does not work for us because during import:

  • the author is replaced with the current user,

  • timestamps are overwritten.

Questions:

  1. Is there a way to export/import data while preserving:

    • original creator / last author,

    • original creation / modification timestamps?

  2. Can this be achieved via configuration, or does it require a custom approach (e.g., using the REST API)?

  3. What would be the recommended best practice for this kind of migration (without history, but with correct metadata)?

Any advice or real-world experience would be greatly appreciated

Have you already tried to export your data with “with history” disabled, and then import it using “import as backup package”?

If I don’t misunderstand your problem, this usually achieves exactly what you’re looking for:

  • no history (clean instance)
  • but original metadata (creator, last editor, timestamps) preserved

Hi, thanks for the suggestion! I’ve already tried it - I exported both with the “Backup package” option enabled and without it. When importing with “Import as backup package,” the original creator/editor is preserved, but the last modified date gets reset to the export date.

Thanks for the clarification! In a similar case we were using a custom export/import approach based on the Filter API (similar to this example: Export a list of wiki pages as a XAR on the file system, combined with some post-processing of the generated XAR to adjust metadata but it was not about the last modified date.