Why AEM Tar Compaction
AEM Tar Compaction is useful when your AEM Instance start working slowly and your local disk space it is getting Increase. So, to free unwanted disk space and increase the performance of the AEM instance can speed up the working of AEM Instance. It can be performed online as well as offline.
How to Do offline Tar Compaction for AEM
To perform the Offline AEM Tar Compaction for AEM Quick-start repository, so it can free disk space and increase the performance of the AEM instance can speed up the working of AEM Instance. We can also perform the Online AEM Tar Compaction for AEM Quick-Start Repository but it will not the best solution for decreasing the AEM Quick-Start repository size and increasing the Speed of AEM Instance.
First, you have to check Current Oak version of AEM, you can check it in the CRXDE Page in the workspace top right you can find it here is the screenshot for reference.
It is best practice to perform the Offline AEM Tar Compaction with current Oak Version to avoid any other issue. Here we are using the Oak-run-1.22.5.jar because we have Oak 1.22.5.
Go to the MAVEN repository correct oak jar file, Here is the Direct URL for MAVEN Repository.
Place the Oak Jar in your AEM installation folder, since you can keep it anywhere in that case you have to specify full path of your AEM Quick-start folder so to avoid the path hassle keep it in the same folder as below.
Before performing the Offline AEM Tar Compaction make sure you have shut down your AEM Instance and can keep the backup as well.
After installing the correct Oak jar version from MAVEN Repository open the command prompt CMD/Terminal in the same folder where you have kept the Oak Jar file. And type the below command.
- Use the Oak Jar tool to find old checkpoints It is an optional Step you can perform or can avoid this step:
java -jar oak-run.jar checkpoints <Your AEM install-folder>/crx-quickstart/repository/segmentstore
It will give you the list of old checkpoints as show in the image.
- Then, delete the unreferenced checkpoints this is also optional Step you can also Avoid it or can perform it, but it is good practice to perform this to remove the unused reference by using the command below.
java -jar oak-run.jar checkpoints install-folder/crx-quickstart/repository/segmentstore rm-unreferenced
- Run the compaction and wait for it to complete use the below command to run the Compaction:
java -jar -Dsun.arch.data.model=32 oak-run.jar compact install-folder/crx-quickstart/repository/segmentstore
Wait to complete the above command to run and you will see the logs something like this.
Check the AEM Quick-Start file again it is reduced now. You can perform the TAR Compaction weekly or Monthly to keep the Disk size Free.
Point to keep in mind while Doing the Offline AEM Tar Compaction:
- Make sure you have latest Backup of your AEM Instance.
- Shut-Down the AEM Instance.
- Oak run jar should have the matching version with your current Oak Version.To Perform the Online AEM Tar Compaction will post the other post very soon.
If you really find this post useful, you can help me to keep this alive by buying me a cup of coffee.
Stay Safe & Healthy Happy Learning & Coding