Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Migrating Liferay Document Library
Hello, I have the need to migrate content from a portal created with liferay-portal-6.1.0-ce-ga1.
I investigated and found that the attachments are in JCR:
and
In the mysql database, the are two tables with more than 30GB each:
These two tables have two fields:
The is another table that has important info about the files (the fileentreyid, folderid, extention, mime type, title, etc):
Can anyone help me with this? I don't have any experience with liferay or jackrabbit or even with... java... I'm a PHP developer who ended up with this migration, can you help me out?Thank you in advance
I investigated and found that the attachments are in JCR:
##
## Document Library Portlet
##
dl.store.impl=com.liferay.portlet.documentlibrary.store.JCRStore
and
<filesystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
<param name="driver" value="com.mysql.jdbc.Driver">
<param name="url" value="jdbc:mysql://localhost:3306/lportal_61_BGA1?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false">
<param name="user" value="root">
<param name="password" value="Admin">
<param name="schema" value="mysql">
<param name="schemaObjectPrefix" value="J_FS_${wsp.name}_">
</filesystem>
In the mysql database, the are two tables with more than 30GB each:
- j_v_pm_binval
- j_pm_liferay_binval
These two tables have two fields:
- BINVAL_ID
- BINVAL_DATA
The is another table that has important info about the files (the fileentreyid, folderid, extention, mime type, title, etc):
- dlfileentry
Can anyone help me with this? I don't have any experience with liferay or jackrabbit or even with... java... I'm a PHP developer who ended up with this migration, can you help me out?Thank you in advance
Nuno Silva:
Migrate to where/what?
Hello, I have the need to migrate content from a portal created with liferay-portal-6.1.0-ce-ga1.
Liferay's database contains the Metadata, and the Jackrabbit tables, that you found, contain the binary data of documents. Just processing the raw tables doesn't look good to me, because you'll miss the metadata - that's why I'm asking what you migrate the data to.
If you upgrade Liferay (because 6.1 is quite old), you can just migrate to one of the other storage adapters that newer versions of Liferay continue to support. This migration assistant is built-in.
If you upgrade to another system, maybe that's still the easiest, if you migrate the content to one of the file-based storage adapters. At least then you'll have the raw files on disk individually.
Hello, thank you for your reply
We are creating a new portal that doesn't use liferay, it's based in PHP (symfony).
We don't have any liferay background, or even java... so we are a bit "scared" to upgrade the current portal (witch is still currently in use) to new versions, expecially because the portal is customized and the team that developed it is not availablle.
The current portal (liferay) will be in use until the day we finish the new (PHP) version. We need to migrate the attachments used in the current version to the new version so the users don't loose the info they created in the current portal.
When you say that we will loose, metadata, are you refering to info like size, file type etc? that info is also on a table.
Thank you again
We are creating a new portal that doesn't use liferay, it's based in PHP (symfony).
We don't have any liferay background, or even java... so we are a bit "scared" to upgrade the current portal (witch is still currently in use) to new versions, expecially because the portal is customized and the team that developed it is not availablle.
The current portal (liferay) will be in use until the day we finish the new (PHP) version. We need to migrate the attachments used in the current version to the new version so the users don't loose the info they created in the current portal.
When you say that we will loose, metadata, are you refering to info like size, file type etc? that info is also on a table.
Thank you again
It depends on your usecase, but maybe Webdav could be useful.
You can access the Liferay document library using the Webdav protocol (note: it might be disabled in your configuration, but it is usually enabled). I am not sure about the UI of Liferay 6.1, but in the document library there should be a button/menu entry "Access from Desktop" or something like that. Or when you click on a document there should also be a Webdav url somewhere.
Using Webdav you can copy the files as a folder tree. You lose some metadata doing this like when the file was uploaded. And versions. But maybe that's sufficient for you.
Another idea: In the Server Administration there should be a dropdown/button somewhere that allows you to change the storage adapter (I hope it is actually there, there are so many Liferay versions with different features, but I think, 6.1 allowed you to do that). You absolutely need to backup the system and do this on a backup!! But with that button you can migrate everything to the filesystem. The files will then be placed named with version numbers in a folder structure like /groupId/folderId/fileEntryId.
You can access the Liferay document library using the Webdav protocol (note: it might be disabled in your configuration, but it is usually enabled). I am not sure about the UI of Liferay 6.1, but in the document library there should be a button/menu entry "Access from Desktop" or something like that. Or when you click on a document there should also be a Webdav url somewhere.
Using Webdav you can copy the files as a folder tree. You lose some metadata doing this like when the file was uploaded. And versions. But maybe that's sufficient for you.
Another idea: In the Server Administration there should be a dropdown/button somewhere that allows you to change the storage adapter (I hope it is actually there, there are so many Liferay versions with different features, but I think, 6.1 allowed you to do that). You absolutely need to backup the system and do this on a backup!! But with that button you can migrate everything to the filesystem. The files will then be placed named with version numbers in a folder structure like /groupId/folderId/fileEntryId.
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™