These tools allow you to export one or several pages from your wiki into a XAR file (Xwiki ARchive) or to import one or several pages from an existing XAR file. This is very useful for backing up your wiki and for restoring a wiki from scratch (see also the Backup guide for more information on backups).

Importing XWiki pages

Prerequisites:

  • A configured database and Servlet Container. If you don't have them, see the Installation guide.

Follow the steps:

ImportPackageColibri.png

  • Attach the XAR file you wish to import and then select it in the list. After a few seconds you should see the list of all the pages in your XAR listed and selected by default (unselect if you wish not to import some pages).
  • Select option "with history" if you want to preserve imported pages history. If not checked newly imported pages will have revision "1.1".
  • Click on the Import button. This will import all the selected pages.
  • At this stage your rights might have been changed as the import may have imported different rights. You may need to log out and log in again.

If you get a 'Java heap space Out Of Memory exception' you'll need to increase the memory allocated to the JVM running XWiki. How you do this depends on the container you use.

  • For Jetty you edit a line in start_xwiki.bat (or start_xwiki.sh) from JAVA_OPTS=-Xmx300m to something like JAVA_OPTS=-Xmx1024m
  • For Tomcat you set CATALINA_OPTS to something like -Xmx1024m.

Exporting XWiki pages

Prerequisites:

  • A configured database and Servlet Container. If you don't have them, see the Installation.

Follow the steps:

ExportPackageColibri.png

Customizing a XAR

When doing an export, XWiki pages are saved using the XAR format. This is in fact a renamed ZIP format with a package.xml file containing metadata about the export. A typical XAR created when doing an export will include all the pages on your XWiki instance.

It is possible however to create a XAR that will include only the pages you want. This is useful when you want to export only the pages of a specific Application. Here are the steps:

  • Unzip the file
  • Keep the pages you want to put in your archive
  • Edit package.xml to delete the pages you do not want to be in the archive
  • Zip together the modified package.xml file and the pages you want to put together in your archive, naming the file "MyArchive".xar where "MyArchive" is the actual name you want to give it.
  • You're done! You can now import this specific set of pages to any XWiki instance.

In the future XWiki will offer the ability to do selective exports.

Tags:
Created by Vincent Massol on 2006/12/12
   

Get Connected