Thursday, September 15, 2011

How to reindex Large Repository in CQ or CRX

Note: Please test this before using.

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 production repository again
  • On the repository copy:
    • delete the index
    • start repository, which will start the indexing process
    • once 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/ to crx-quickstart/repository/
  • 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/
  • Rename crx-quickstart/repository/ to


  1. Generally I don't read anything but thanks for writing when i read this i felt how graceful as a writer you are.thank you for posting-
    Packers and Movers Kolkata