liferayjackrabbitglassfish-webspace

How to switch jackrabbit persistence from filesystem to database?


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).

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


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 :

    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