You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by yanshaozhiGmail <ya...@gmail.com> on 2009/02/04 09:44:18 UTC

Is there any easy method to backup and restore data in sling

Hi everyone:

Is there any smooth way to backup and restore data in sling ?
Thanks.

2009-02-04 



yanjie

Re: Is there any easy method to backup and restore data in sling

Posted by Douglas José <do...@gmail.com>.
Hi Yanjie,

On Wed, Feb 4, 2009 at 09:44, yanshaozhiGmail <ya...@gmail.com>wrote:

> Hi everyone:
>
> Is there any smooth way to backup and restore data in sling ?


Sling stores its data in a Jackrabbit repository (a JCR[1] implementation).
The JCR spec covers content exporting and importing in the paragraphs 6.4,
6.5 and 7.3. I strongly advise you to take a look in those topics, if you
haven't done yet.
In summary, you can export your content to XML using the method
'exportSystemView' [2] and import it back using the method 'importXML' [3],
both belonging to the javax.jcr.Session class.
Another option is to persist your repository in a RDBMS, and then all you
need to concern is about the database backup. If you're interested in know
more about it, the Jackrabbit users list [4] is the most appropriate place.

Kindly,

-- 
Douglas Jose
http://douglasjose.com

- "Use free software. Help us make a free world."

[1] http://jcp.org/en/jsr/detail?id=170
[2]
http://www.day.com/maven/jsr170/javadocs/jcr-1.0/javax/jcr/Session.html#exportSystemView(java.lang.String,%20java.io.OutputStream,%20boolean,%20boolean)
[3]
http://www.day.com/maven/jsr170/javadocs/jcr-1.0/javax/jcr/Session.html#importXML(java.lang.String,%20java.io.InputStream,%20int)
[4] http://jackrabbit.apache.org/mailing-lists.html