如何在 AEM 中克隆 TarMK 实例
在Linux上将rsync与AEM结合使用以在AEM中克隆TarMK实例的快速步骤。
描述 description
环境
- Experience Manager
问题/症状
本文介绍如何正确克隆使用TarMK(或TarMK + FileDataStore)进行存储的AEM实例。
解决方法 resolution
以下步骤演示了如何使用安装在/mnt/aem/author下的AEM在Linux上使用rsync复制AEM + TarMK + FileDataStore实例。
-
使用 rsync 等命令在运行时将完整的 AEM 实例复制到另一台服务器。 确保在复制过程中保留时间戳并排除日志文件夹和数据存储。 例如:
rsync -av --exclude 'crx-quickstart/logs' --exclude 'crx-quickstart/repository/repository/datastore' /mnt/aem/author user@dest-host:/mnt/aem/
-
停止 AEM
-
启动TarMK段存储文件夹的另一个副本,以获取自第一个副本完成后的任何更新:
rsync -av /mnt/aem/author/crx-quickstart/repository/segmentstore/* user@dest-host:/mnt/aem/author/crx-quickstart/repository/segmentstore/
-
启动 AEM。
-
在 AEM 运行时复制数据存储。例如:
rsync -av /mnt/aem/author user@dest-host:/mnt/aem/crx-quickstart/repository/repository/datastore /mnt/aem/crx-quickstart/repository/repository/
-
在目标服务器上,重新创建日志文件夹,删除crx-quickstart/repository/index文件夹,然后从crx-quickstart/launchpad/felix文件夹中删除sling.id.file。
mkdir /mnt/aem/crx-quickstart/logs
rm -rf /mnt/aem/crx-quickstart/repository/index
find /mnt/aem/crx-quickstart/launchpad/felix -type f -name "sling.id.file" -exec rm -f {} \; -print
-
在目标服务器上,启动 AEM 并测试您的实例。
重要说明:
您必须确保在segmentstore文件夹之后复制数据存储,并且在复制期间保留所有时间戳。 Rsync允许使用 — a选项保留时间戳。