Export from 2.10 and import into 5.9.9

I have two confluence servers currently running. One is running confluence 2.10 on an expired license. The other is running confluence 5.9.9 with an up to date license. I want to import all of the pages from the older version into the newer one. I've run into problems when trying to export/backup the pages from the 2.10 version due to having ~2,000 pages. Is there an automated way to do this? I was trying to follow the instructions on this page using smaller groups of exported pages, but none of the buttons described seemed to exist. I had someone suggest to me to use Confluence rest API, but I'm not exactly sure what that process would look like.

4 answers

1 accepted

1 vote
Accepted answer

The programmatic approach to migrating this data is to script a manual conversion of that data by reading the date from 2.10.x and writing it into 5.9.x: firstly, you'll need to use XML-RPC or SOAP for reading the data from 2.10.x, Confluence only gained a REST API starting in 5.5. You can see how to do that in https://developer.atlassian.com/confdev/deprecated-apis/confluence-xml-rpc-and-soap-apis. Alternatively, you should be able to use a command line wrapper for that, through tools like Confluence CLI https://marketplace.atlassian.com/plugins/org.swift.confluence.cli/server/overview, although it looks like that's up to 6.0 now, and the version that supports Confluence 2.10 was before 2.0, and doesn't seem to be on the marketplace listing sad

The steps your script would need invoke several methods (with full documentation in https://developer.atlassian.com/confdev/deprecated-apis/confluence-xml-rpc-and-soap-apis/remote-confluence-methods):

  1. log in to the old site with String login(String username, String password)
  2. collect all the spacekeys of the old site with Vector<SpaceSummary> getSpaces(String token)
  3. collect all the content ids for the pages and blogs you want to migrate from the old site with Vector<BlogEntrySummary> getBlogEntries(String token, String spaceKey) and Vector<PageSummary> getPages(String token, String spaceKey)
  4. extract the wikimarkup page and blog source from the old site with BlogEntry getBlogEntry(String token, String pageId) and Page getPage(String token, Long pageId)
  5. extract the attachments from the old site with Attachment getAttachment(String token, String pageId, String fileName, String versionNumber) and byte[] getAttachmentData(String token, String pageId, String fileName, String versionNumber)
  6. and then carry out the equivalent calls to store all this data on the new site.

I can't guarantee that this will correctly migrate all content imported using this mechanism, but it should be good enough to only need manual fixes on a handful of pages. There may be more steps to restore page permissions and space permissions as well, but this should give you the general idea of how this approach works.

1 vote

Confluence will need to do some significant data migrations on pages from a 2.10.x site so that it can work with them on a 5.9.x. Sadly, it still hasn't implemented data migrations on space import, and there's no support for migrations at the page level through the UI either.

The user-friendly approach to fixing this is to do a site upgrade, then do space exports from the old site and import them into the new site. Complicating this approach is that Confluence dropped support for doing upgrades from significantly older versions, which means the upgrades would have to be done in multiple steps (for details on this, see https://confluence.atlassian.com/doc/upgrading-confluence-4578.html). That is:

  1. create a site backup of the old instance, in case anything goes wrong. If the XML site export feature is failing for you, try giving the old instance more memory first. If that doesn't work, then create a DB level backup of the old site's database, and take a copy of the old site's home directory.
  2. temporarily provide a full license to the 2.10.x instance to allow upgrading.
  3. upgrade the old site to Confluence 3.5.17.
  4. upgrade the old site to Confluence 5.0.3 (which will do most of the required data migrations).
  5. upgrade the old site to Confluence 5.9.9 (the same bugfix version as the new site).
  6. create space exports from the old site. Visit the space administration screens for each space you want to export, and select export space, including all restricted pages.
  7. import the space exports into the new site.
0 votes

Do you really mean Confluence 2.10? That version came out in December 2008...

Yes, I really mean Confluence 2.10.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Feb 06, 2019 in Confluence

Try out the new editing experience

Hi team, I’m Avinoam, a product manager on Confluence Cloud, and today I’m really excited to let the Community know that all customers can now try out the new editing experience and see some of the ...

934 views 47 7
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you