Question

I have a Liferay portal that was configured to use filesystem persitence for jackrabbit.

It seems like this persistence mode creates a lot of files on the filesystem (so far something like 113'000) and I'm slowly reaching the file count quota of the server.

I would like then to switch to database persistence. I know how to configure it but I don't know how to migrate the existing content.

Exporting and importing the various libraries (document, images, etc.) sounds like a lot of work and very error-prone, especially because it's a multi-homed deployment. Plus, I don't know if it will recreate the same exact URL for the documents, which is important to me.


Short update:

I managed to upgrade to Liferay 6. There is however no way to migrate the jackrabbit data from file system to database from within Liferay; what the Data Migration panel offers is to migrate from jcr hook to another persistence hook.

My initial issue was not to have the data in a database but to reduce the number of files on the filesystem (quota limit). I then switched to the FileSystemHook.

Here is the file count number (find . | wc -l).

  • JCRHook: 107566
  • FileSystemHook: 2810.

Don't know why Jackrabbit creates so much files...

Was it helpful?

Solution

In Liferay 6, there is a new dedicated page in the portal administration that is intended to facilitate migrations like that. You have to log in as an administrator (omniadmin if you have multiple portal instances in your server)and go to the Control Panel. In the Server Administration pannel, click on the Data Migration menu and you will be offered to migrate from FileSystem to database.

It appears that you are not yet in Liferay 6 (Glassfish WebSpace Server is a Liferay 5.2), so there are several options :

  • upgrade the portal itself to from 5.x to 6.0.5, as explained in the Liferay Wiki and the use the migration page.
  • stay with your version, and create dedicated class inspired by the ones provided by Liferay in version 6
  • export the community pages (Liferay ARchive), create a new portal with DB persistance and import the pages and their content.

The migration would be my pick, either with the whole portal (but chances are that it's not something on your roadmap) or with ad hoc migration classes.

Arnaud

OTHER TIPS

There are several ways to migrate, most of them are documented in the Jackrabbit Wiki:

Export to XML may not work for large repositories, because it uses too much memory (you need to try). I have never used the other migration tools, so I can't comment on them.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top