XAR Export as a Backup Method

Last modified by Eleni Cojocariu on 2026/08/20 10:23

Explanation

Most of what a wiki contains is stored in Pages, so exporting them all as a XAR file looks like a way to back up an instance. It is not one: a XAR file holds Pages, and an instance is more than its Pages.

What a backup has to holdIn a XAR export
Pages, their history, users, rights, and the settings entered through the AdministrationYes, and the history only when the export asks for it
AttachmentsYes
Event stream, statistics, the recycle bins of deleted Pages and attachments, mail statuses and the mails still queued, the notifications users received and their notification filter preferences, ratings and Page likes, mentions still to be processed, Feed plugin dataNo, each is a database table of its own
Configuration files, installed extensions, search indexes, log filesNo, they are files of the web application and of the permanent directory
The instance id, and the identifier the instance uses in a clusterNo, and a clone deliberately keeps its own

Even for the Pages it does hold, an export is the weaker tool. A database dump is taken by a program written to back databases up, so it can run incrementally and check that what it wrote can be read back, neither of which a wiki can do about itself.

What a XAR export is for is moving content rather than protecting it: carrying Pages and applications from one instance to another, moving them to another wiki of a farm, and converting an instance from one database to another by exporting from the old instance and importing into a new one configured on the new database.

FAQ

So how should I back an instance up?

With the database's own tool and a copy of the files, as Back Up an XWiki Instance describes.

Does a XAR export include the page history?

Only when "With history" is ticked in the export settings. Otherwise each Page arrives at its latest version alone.

Can I move my wiki to another database with an export?

Yes, that is one of the cases it is for: install a new instance on the target database and import the XAR into it.

Related

Get Connected