Wiki source code of Import/Export

Last modified by Thomas Mortagne on 2023/10/10

Show last authors
1 {{box cssClass="floatinginfobox" title="**Contents**"}}
2 {{toc/}}
3 {{/box}}
4
5 This feature allows you to export one or several pages from your wiki into a [[**XAR** file>>extensions:Extension.XAR Module Specifications]] (**X**Wiki **AR**chive) or to import one or several pages from an existing XAR file. This is useful for moving wiki pages from one instance to another or to perform lightweight backup of your wiki pages.
6
7 {{warning}}
8 This feature doesn't replace a [[proper backup>>Backup]].
9 {{/warning}}
10
11 = Importing wiki pages =
12
13 This feature is brought by the [[Administration Application>>extensions:Extension.Administration Application]] and is documented in the [[Import section>>extensions:Extension.Administration Application#HImport]].
14
15 = Exporting wiki pages =
16
17 This feature is brought by the [[Administration Application>>extensions:Extension.Administration Application]] and is documented in the [[Export section>>extensions:Extension.Administration Application#HExport]].
18
19 == Customizing a XAR ==
20
21 When doing an export, XWiki pages are saved using the [[XAR format>>Documentation.AdminGuide.ImportExport||anchor="HXARFormat"]]. A typical XAR created when doing an export will include all the pages on your XWiki instance. However you can [[control this using a custom Export URL>>Documentation.UserGuide.Features.Exports||anchor="HXARExport"]].
22
23 That said, it is also possible 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 for example. Here are the steps:
24
25 * Unzip the file
26 * Keep the pages you want to put in your archive
27 * Edit ##package.xml## to delete the pages you do not want to be in the archive
28 * 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
29 * You're done! You can now import this specific set of pages to any XWiki instance
30
31 {{info}}
32 In the future XWiki will offer the ability to do selective exports natively. For the moment you'll need to install the [[Multipage Export Extension>>extensions:Extension.Multipage Export Application]].
33 {{/info}}
34
35 = XAR Format =
36
37 See [[XAR Format specifications>>extensions:Extension.XAR Module Specifications]].

Get Connected