如何将 jackrabbit 持久性从文件系统切换到数据库?

发布于 2024-09-29 05:10:06 字数 746 浏览 5 评论 0原文

我有一个 Liferay 门户,配置为使用 jackrabbit 的文件系统持久性。

似乎这种持久模式在文件系统上创建了大量文件(到目前为止大约 113'000 个),并且我正在慢慢达到服务器的文件计数配额。

然后我想切换到数据库持久性。我知道如何配置它但是我不知道如何迁移现有内容

导出和导入各种库(文档、图像等)听起来工作量很大,而且很容易出错,特别是因为它是多宿主部署。另外,我不知道它是否会为文档重新创建完全相同的 URL,这对我来说很重要。


简短更新:

我设法升级到 Liferay 6。但是,无法将 Liferay 内的 Jackrabbit 数据从文件系统迁移到数据库;数据迁移面板提供的是从 jcr 钩子迁移到另一个持久性钩子。

我最初的问题不是将数据存储在数据库中,而是减少文件系统上的文件数量(配额限制)。然后我切换到FileSystemHook

这是文件计数(find . | wc -l)。

  • JCRHook: 107566
  • FileSystemHook: 2810。

不知道为什么 Jackrabbit 创建这么多文件...

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

神魇的王 2024-10-06 05:10:06

在 Liferay 6 中,门户管理中有一个新的专用页面,旨在促进此类迁移。您必须以管理员身份登录(如果您的服务器中有多个门户实例,则为 omniadmin)并转到控制面板。
在“服务器管理”面板中,单击“数据迁移”菜单,您将被要求从文件系统迁移到数据库。

看来您还没有使用 Liferay 6(Glassfish WebSpace Server 是 Liferay 5.2),因此有多种选择:

  • 将门户本身从 5.x 升级到 6.0.5,如 Liferay Wiki 并使用迁移页面。
  • 保留您的版本,并创建受 Liferay 在版本 6 中提供的类启发的专用类,
  • 导出社区页面(Liferay ARchive),创建具有数据库持久性的新门户并导入页面及其内容。

迁移将是我的选择,要么使用整个门户(但很可能它不在您的路线图上),要么使用临时迁移类。

阿尔诺

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

七度光 2024-10-06 05:10:06

有多种迁移方法,其中大多数都记录在 Jackrabbit Wiki 中:

导出到 XML 可能不适用于大型存储库,因为它使用太多内存(您需要尝试)。我从未使用过其他迁移工具,因此无法对其进行评论。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文