Xwiki export/import from 10.6.1 to 13.1

Hello,
We are trying to upgrade xwiki from version 10.6.1 to the latest stable (13.3).
We have a tomcat distribution of the wiki.
In order to get a cleaner installation we’re trying to export all the data from the old xwiki through a .xar file and import them in a fresh installation.
We had no problem with the export but the during the import we got the following errors:

-Export (with and without history) and import as superadmin user.
“xwiki import an error occurred while uploading”
2021-05-11 11:20:31.699:WARN:oejs.HttpChannel:qtp859417998-10997: handleException /xwiki/bin/upload/XWiki/XWikiPreferences org.eclipse.jetty.http.BadMessageException: 400: Unable to parse form content
java.lang.OutOfMemoryError: Java heap space

-Export (with and without history) and import as admin user.
WARN:oejs.HttpChannel:qtp859417998-10997: handleException /xwiki/bin/upload/XWiki/XWikiPreferences org.eclipse.jetty.http.BadMessageException: 400: Unable to parse form

-Export (with and without history, with and without “backup” option) and import as admin user.
WARN:oejs.HttpChannel:qtp859417998-10997: handleException /xwiki/bin/upload/XWiki/XWikiPreferences org.eclipse.jetty.http.BadMessageException: 400: Unable to parse form

Do you have any suggestion about how to solve those errors?
Thanks in advance

How big is the XAR file generated by export? And BTW, did you export only the pages you created? Otherwise, if you include standard pages in the XAR export they will overwrite the pages from v13.3 and this can easily cause problems. This is why upgrading with XAR export / import is not really recommended: it doesn’t do a 3-way merge like the Distribution Wizard on the standard upgrade process.

If you still want to do the XAR export / import, try to allocate more memory to the XWiki instance, at least while you do the import.

Hi,

Many thanks for your answer.

We changed the startup options in /etc/default/tomcat8, as suggested, and now the “outOfMemory” error is not present anymore.

The XAR size is about 500 Mb. We used the export extension from the global administration, so i think we exported all the content and not only the single pages. We have a lot of pages in our xwiki so this was the fastest option.
Anyway, we also tried to export+import single pages and that worked with no error, but the result was not satisfying because in the end we got a lot of blank pages and broken links.

I’m attaching the new log we get when we try to import (no memory errors this time). We can see many errors but honestly i can’t understand what causes them, maybe there are multiple problems with overwriting “standard pages”, as you said.
catalina.out.txt (407.0 KB)
Can you please take a look at it?

What other way do you suggest? Is it better if we focus on the errors we get on the export of single pages?

Thanks,

I can’t tell from the logs what is wrong but anyway, export / import is not the right / recommended way to upgrade (unless you make sure you export only the pages you create, which is hard on 10.6.1 but possible since 11.10, see https://extensions.xwiki.org/xwiki/bin/view/Extension/Administration+Application#HExport ). Have you checked the upgrade guide at https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Upgrade ?