For a pseudo disaster recovery plan, I would like to export all subwiki pages to a self contained html file.
I am able to export pages and sub pages like this:
The following worked for me http://localhost:8080/xwiki/bin/export/Space/Page?format=html&pages=%25&name=AllPages (it takes a lot of time though and it’s not really made for that).
If you want to save your wiki content, you should use a XAR export instead.
The wiki I try to export is a subwiki, does this change anything with the URL?
With this URL, nothing happens, I get a 200 https code and a white page.
…/xwiki/bin/export/Space/Page?format=html&pages=%25&name=AllPages
I can alter the URL and the same result occurs.
When I hit this URL …/xwiki/bin/export/Space/ it makes a XAR export and starts downloading.
I can invent a URL and the xar archive start downloading anyway. Example: …/xwiki/bin/export/Space/Happy-New-Year-2024
What’s great with HTML export is that it provides a self contained HTML that can be opened and browsed.
This is not the case for xar. One need a xwiki instance to import it.
Are you using a domain-based URL for subwikis? I’m asking as I don’t see the full URL you’re using and it doesn’t seem you’re using path-based UTLs (i.e. /wikis/<wiki name>/... instead of /bin/...).
I’ll need to find some time to try it out (with a subwiki). Maybe pages=<subwikiname>:%25.%25 would work.