Wiki source code of Import/Export
Last modified by Thomas Mortagne on 2023/10/10
Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
13.2 | 1 | {{box cssClass="floatinginfobox" title="**Contents**"}} |
2 | {{toc/}} | ||
3 | {{/box}} | ||
![]() |
1.1 | 4 | |
![]() |
31.3 | 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. |
![]() |
1.1 | 6 | |
![]() |
16.2 | 7 | {{warning}} |
8 | This feature doesn't replace a [[proper backup>>Backup]]. | ||
9 | {{/warning}} | ||
![]() |
16.1 | 10 | |
![]() |
33.1 | 11 | = Importing wiki pages = |
![]() |
1.3 | 12 | |
![]() |
33.1 | 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]]. |
![]() |
27.1 | 14 | |
![]() |
33.1 | 15 | = Exporting wiki pages = |
![]() |
8.1 | 16 | |
![]() |
34.1 | 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.1 | 18 | |
![]() |
11.4 | 19 | == Customizing a XAR == |
![]() |
1.7 | 20 | |
![]() |
35.1 | 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"]]. |
![]() |
1.7 | 22 | |
![]() |
26.1 | 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: |
![]() |
18.1 | 24 | |
![]() |
1.8 | 25 | * Unzip the file |
26 | * Keep the pages you want to put in your archive | ||
![]() |
16.2 | 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 | ||
![]() |
1.9 | 30 | |
![]() |
13.2 | 31 | {{info}} |
![]() |
14.1 | 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]]. |
![]() |
13.2 | 33 | {{/info}} |
![]() |
26.1 | 34 | |
![]() |
26.2 | 35 | = XAR Format = |
![]() |
26.1 | 36 | |
![]() |
28.1 | 37 | See [[XAR Format specifications>>extensions:Extension.XAR Module Specifications]]. |