I'm working with Apache Jackrabbit using JCR API. I have exported current repository to a XML file:
session.exportSystemView("/", out, false, false);
Then, I imported the generated XML file to new instance of Jackrabbit:
session.importXML("/", in, ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING);
Now I can read and query imported files on new Jackrabbit Server using JCR API. But, I can't see the imported files in the standard WebDAV repository browser in the following address (the root is empty):
http://localhost:8080/repository/default/
so where is the problem?
I found the answer, according to Alexander Answer
Note that this approach has one drawback: it is currently not possible to re-import a full export, ie. from the root node and including the jcr:system subnode that contains the version storage, since the jcr:system part and especially the version storage are not writeable (this is mainly because JCR does not specify how to import versions)
in JCR we can't re-import the whole backup (including root node), so it's better to add a parent node (e.g /docs) on all files, then we can export and re-import the parent node.