Re: [xwiki-users] XAR
Hi Eduard, Thanks for the explanation and the links. I am not looking for the Java way since we already have a XML exporter in place that is exporting the information in our environment (which is heavily object based) in a way that can be used by third parties. This is the way we are looking for a more final solution. We were looking for an easy and quick (intermediate) solution to bridge the gap so to speak. The strange thing is, that I use google to search extensively for things before i ask for info in this group. I was somewhat surprised to see the link (no 7) which is exactly what I needed! I thank you again for the help and I’m sorry that I have not been able to find it myself. Br, Peter
Hi Peter,
Of course, though you might want to think a bit on the approach.
1) If you want to do it in XWiki using the scheduler plugin, you have to write some groovy script [1] in the scheduled task that you create in order to use the filter module [2] (or the old packager module [3], whichever you choose) in order to export the pages you are interested in and save the result (on the filesystem or as an attachment in a page).
As inspiration, you could check out the source code (in java) of the export action [4] which is exactly what is going on when you are exporting a page from the UI.
2) A simpler choice, IMO, would be to schedule a cron [5] task on a linux machine (possible the same one running the XWiki instance) and have that task simply download (using something like cURL [6]) the result of a manually crafter export URL (as detailed in our documentation [7]) containing the list of pages to export.
Hope this helps, Eduard
---------- [1] http://platform.xwiki.org/xwiki/bin/view/DevGuide/Scripting [2] http://extensions.xwiki.org/xwiki/bin/view/Extension/Filter+Module [3] https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwik... [4] https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwik... [5] https://en.wikipedia.org/wiki/Cron [6] https://en.wikipedia.org/wiki/CURL [7] http://platform.xwiki.org/xwiki/bin/view/Features/Exports#HXARExport
On Thu, Sep 17, 2015 at 3:49 PM, Peter Huisman <p.huisman@ximm.nl> wrote:
Hi,
Is there a way to generate XAR’s using XWiki’s scheduling function? I’m not looking for a DB based backup but merely for a backup of spaces / pages.
With kind regards,
Peter _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Hi, Glad to be able to help :) On Fri, Sep 18, 2015 at 11:10 AM, Peter Huisman <p.huisman@ximm.nl> wrote:
Hi Eduard,
Thanks for the explanation and the links.
I am not looking for the Java way since we already have a XML exporter in place that is exporting the information in our environment (which is heavily object based) in a way that can be used by third parties. This is the way we are looking for a more final solution. We were looking for an easy and quick (intermediate) solution to bridge the gap so to speak.
The strange thing is, that I use google to search extensively for things before i ask for info in this group. I was somewhat surprised to see the link (no 7) which is exactly what I needed! I thank you again for the help and I’m sorry that I have not been able to find it myself.
We always are in need of and appreciate any help on the documentation side. If you feel you could add anything that could make it easier to understand or even easier to find on a Google search, please go ahead. It`s a wiki and you are welcomed to edit away :) Thanks, Eduard
Br,
Peter
Hi Peter,
Of course, though you might want to think a bit on the approach.
1) If you want to do it in XWiki using the scheduler plugin, you have to write some groovy script [1] in the scheduled task that you create in order to use the filter module [2] (or the old packager module [3], whichever you choose) in order to export the pages you are interested in and save the result (on the filesystem or as an attachment in a page).
As inspiration, you could check out the source code (in java) of the export action [4] which is exactly what is going on when you are exporting a page from the UI.
2) A simpler choice, IMO, would be to schedule a cron [5] task on a linux machine (possible the same one running the XWiki instance) and have that task simply download (using something like cURL [6]) the result of a manually crafter export URL (as detailed in our documentation [7]) containing the list of pages to export.
Hope this helps, Eduard
---------- [1] http://platform.xwiki.org/xwiki/bin/view/DevGuide/Scripting [2] http://extensions.xwiki.org/xwiki/bin/view/Extension/Filter+Module [3]
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwik...
[4]
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwik...
[5] https://en.wikipedia.org/wiki/Cron [6] https://en.wikipedia.org/wiki/CURL [7] http://platform.xwiki.org/xwiki/bin/view/Features/Exports#HXARExport
On Thu, Sep 17, 2015 at 3:49 PM, Peter Huisman <p.huisman@ximm.nl> wrote:
Hi,
Is there a way to generate XAR’s using XWiki’s scheduling function? I’m not looking for a DB based backup but merely for a backup of spaces / pages.
With kind regards,
Peter _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
participants (2)
-
Eduard Moraru -
Peter Huisman