Advanced XAR export | User rights for export

Hello everyone,

I would like to save our entire XWiki as an XAR export at regular intervals. I use the following URL for this purpose: http://server/xwiki/bin/export/Space/Page?
format=xar&pages=Space.Page. The file is downloaded using the curl command, which is given a user and a password. So curl -u user:password -o export.xar ‘http://server/xwiki/bin/export/Space/Page?format=xar&pages=Space.Page’
According to my research, the user needs admin rights to be able to start the export. Is it possible to start the export with a user with fewer rights or what rights can I withdraw from the admin so that he no longer has full control of the system, but can ‘only’ initiate the export? The background is that I don’t want to have an additional admin with full control on the system whose access data is in plain text in the curl command.

Many thanks and best regards
Daniel

Translated with DeepL.com (free version)

Hello, what you asked is not possible easily (since there’s no “export” rights).

I think you could achieve what you want by creating a page on your wiki, protected with some permissions you decide and in it, you’d use a script (velocity, groovy) to perform the export and return the content.Not trivial to write though.

1 Like