Confluence to XWiki

https://www.reddit.com/r/XWiki/comments/1ninzk1/conflunce_to_xwiki/

Guess reddit is not used….

I have a Confluence Data Center as personal website, and in the light of Data Center descend, I have (almost) choosen Xwiki as the new app for my data.

I have tested the Confluence Migrator Pro in trial and it is fine.

But, as a private person I have no money for the Migrator Pro, and it also have an annual cost after migration

So I need do do/write my own migrator - and am I quite confortable in Confluence API, but new to XWiki.

So - any skeleton migrators or simalar I can take advantage of, or anyone that has a free migration script?

BR,

Normann

The migrator pro is mainly relying on the free https://extensions.xwiki.org/xwiki/bin/view/Extension/Confluence/XML/, which takes care of importing pretty much everything (including users and groups) except for most Confluence specific macros (those are imported as place-holders that you can then implement or convert, which is what the pro migrator does, for example).

AFAIK, the main things it adds are:

  • a more user-friendly interface with a few more advanced features (replay an import, etc.)
  • support for many macros which are specific to Confluence (and it can mean a lot, depending on your setup)

I have 15 years of Confluence server/dc/cloud experience, so yes:

support for many macros which are specific to Confluence (and it can mean a lot, depending on your setup)

Will be kind of a mapping issue :slight_smile:

But for sure - it wont be that simple or easy, thanks for the info and sharing :grinning_face:

Also note the existence of:

Good luck!

@moseisleydk Note that as one of the main contributors to both Confluence-XML and Confluence Migrator Pro, I’m a bit surprised to see Confluence Data Center used in a personal setting.

I have to warn you that, in a professional setting, you’ll probably waste time and money and end up with worse results by re-implementing Confluence Migrator Pro and not benefiting from the support it comes with. I would not advise following this path. We’ve been mastering this stuff for some time now, it takes time and trial and errors to get these things right efficiently.

hi @rjakse

Ive worked with Confluence for 15 years and have an Open Souce license as a private person, and its been a good experience. See https:///www.mos-eisley.dk

But the Data Center aera has come to an end - at least in 3,3 years ..

A fact is that most Wikis dont have any or good Confluence migrators, ive skimmed the lot (or someting) and some have an import of the Confluence HTML export. DocMost has it, but that is also a payable version - and DocMost is cool, but extensions, API and scripting etc is not in there so far.

A fact is my existing Data Center will die

A fact is I dont have the money for the Migrator Pro - and dont want to spend that level of money.

A fact is I dont want to start over…

This is not a professional setting, its private.

So - I intend to explore creating a migrator that does not import from XML, but page by page - I have some time to get there - and learch some more python on the way.

I could problably just copy’paste all my pages quicker, but where is the fun in that :slight_smile:

BR,

Normann

Ok, interesting!

Good luck with your migration, I hope you’ll enjoy XWiki and its ecosystem :slight_smile:

@moseisleydk Regarding licenses for paid apps, see also this forum post:

I’m not the one who decides who gets a free license, I just wanted to make sure that you’re aware that this could be an option.

Also, in case you haven’t fully understood, the “paid” migrator is still open source, you can study, modify and re-distribute it under the terms of the LGPL 2.1 license as the rest of XWiki. It just contains some license checks.

Oh, that was not the impression I got, of cause I would like a free license for personal use.

Thanks for the heads up :grinning_face:

Well, this is going extremely well, but I do have one stupid issue - parent child.. via REST:

The first page is AtlassianHome:

<parent>Sandbox.webHome</parent>

and then I want to make the next a child:

<parent>Sandbox.AtlassianHome</parent>

The page is created fine, but not a child to AtlassianHome, its created under SandBox.webHome

Body:

<page xmlns="http://www.xwiki.org"><title>Atlassian Confluence</title><parent>Sandbox.AtlassianHome</parent><syntax>xwiki/2.1</syntax><content>bla</content></page>

A big part of the success is the conversion ripped from GitHub - faktorzehn/confluence2xwiki: Tool to convert Confluence to XWiki Syntax, in a manual or automatic manner.

Feel free to view at Atlassian Home - XWiki - this is the import of Atlassian Home - Atlassian - Mos-Eisley Cantina

2 issues:

  1. Parent - Children … HELP!
  2. Image attachments are broken… FIXED!

I simply dont get the REST..

I can create a page with a PUT on

https://funky.mos-eisley.dk/rest/wikis/xwiki/spaces/Sandbox/pages/AtlassianHome

But if I try to generate a child page with a PUT on:

https://funky.mos-eisley.dk/rest/wikis/xwiki/spaces/Sandbox/spaces/AtlassianHome/pages/sub3

A new “AtlassianHome” thing is created - its not really a page (The requested page could not be found.) - but it actually has a child - the Sub3 page

If I delete the Sub3 page, the “intermediate” page is gone also

Something is a little more wrong than that - the first page AtlassianHome is not acting like a UI created page, If I want to create a page below, its not possible via the UI…

Ok - I found the method on XWiki REST API - Create a sub-page to an already existing page - #2 by acotiuga

Wierdest system I have ever encountered…

I now have a pretty well functioning migrator - and a little documentation - Migrate from Confluence Data Center to XWiki - Information Technology - Mos-Eisley Cantina

Feel free to test

1 Like

Thanks for sharing @moseisleydk!

I feel like you could be missing out a lot by not using Confluence-XML through our Filter Streams Converter extension, many many many hours went into our migrator code, but it’s nice to see other ways of doing things!

1 Like

Hi @rjakse - I am sure it could be done better, but my needs are not that huge, and its a hobby project. I don also have some range of custom user macros etc.