April 1, 2020
Estimated Post Reading Time ~

How to reindex Large Repository in CQ or CRX

Note: Please test this before using it.

Re-indexing a large repository may take a lot of time and cause downtime. The below procedure allows to keep the production repository operational and do the re-indexing on a backup. Downtime of the production repository is limited to the time it takes to index changes that were done on the production system while the re-indexing was performed.
Stop production repository
Create a copy of the repository to a separate machine
Start the production repository again
On the repository copy:
delete the index
start repository, which will start the indexing process
once the repository is up and running (indexing completed), stop it again
stop production repository
replace crx-quickstart/repository/workspaces/crx.default/index with the one from the copy
replace crx-quickstart/repository/revision.log with the one from the copy
rename crx-quickstart/repository/cluster_node.id to crx-quickstart/repository/cluster_node.id.orig
start production repository

At this point, the repository will apply the changes to the index that were done since the copy was made.
Once the repository is online, shut it down again.
Delete crx-quickstart/repository/cluster_node.id
Rename crx-quickstart/repository/cluster_node.id.orig to cluster_node.id


By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.