Skip to content

Instantly share code, notes, and snippets.

@andrewmkhoury
Last active April 29, 2021 08:21
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewmkhoury/bdae21abba26b88908a5 to your computer and use it in GitHub Desktop.
Save andrewmkhoury/bdae21abba26b88908a5 to your computer and use it in GitHub Desktop.
How to clean up unreferenced checkpoints in Oak 1.0.x

Clean up unreferenced checkpoints

  1. Download or build oak-run 1.x matching the version you have installed in your Oak environment.
  2. Stop all AEM instances
  3. Upload the oak-run to the AEM server if using TarMK or MongoDB server (if using MongoMK)
  4. Run this command to cleanup unreferenced checkpoints on TarMK:
java -Xmx4096m -jar /apps/staging/oak-run-1.*.jar checkpoints crx-quickstart/repository/segmentstore rm-unreferenced

Clean up unreferenced checkpoints on MongoMK:

java -Xmx4096m -jar oak-run-1.*.jar checkpoints mongodb://localhost/aem-author rm-unreferenced

Clean up unreferenced checkpoints on RDBMK:

java -classpath ./ojdbc6.jar:oak-run-1.*.jar org.apache.jackrabbit.oak.run.Main checkpoints --rdbjdbcuser OAK_ORACLE_SCHEMA_USER --rdbjdbcpasswd ORACLE_PASS jdbc:oracle:thin:@ORACLEHOST:1521:ORACLESID rm-unreferenced

Remove all checkpoints

WARNING: Removing all checkpoints on an Apache Jackrabbit Oak repository will cause a reindex of all async index lanes (all indexes referencing those lanes).

TarMK:

java -Xmx4096m -jar /apps/staging/oak-run-1.*.jar checkpoints crx-quickstart/repository/segmentstore rm-all

MongoMK:

java -Xmx4096m -jar oak-run-1.*.jar checkpoints mongodb://localhost/aem-author rm-all

RDBMK:

java -classpath ./ojdbc6.jar:oak-run-1.*.jar org.apache.jackrabbit.oak.run.Main checkpoints --rdbjdbcuser OAK_ORACLE_SCHEMA_USER --rdbjdbcpasswd ORACLE_PASS jdbc:oracle:thin:@ORACLEHOST:1521:ORACLESID rm-all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment