Know more about the AEM Revision Cleanup (Online and Offline) Process

AEM stores multiple revisions of content to enable rollback and version control. Over time, this accumulation of revisions can lead to significant disk space consumption. To address this, AEM offers Revision Cleanup, a process that reclaims disk space by removing old revisions.

why developer should do unit testing revision

Types of Revision Cleanup

Offline Revision Cleanup (Since AEM 6.0)

  • Purpose: Performs a more thorough cleanup of the repository by removing older revisions that may not be cleaned by the online process.
  • Process: Requires downtime, as the repository is taken offline. It performs a deep clean, which can reclaim more space and improve performance.
  • Usage: Typically run during maintenance windows when the system can be taken offline, ensuring a comprehensive cleanup. Maintains only one generation of revisions. Used in exceptional cases, like storage space crunch or major upgrades.

Online Revision Cleanup (Since AEM 6.3)

  • Purpose: Automatically removes old, unused revisions (data versions) in the repository during normal operation without downtime.
  • Process: Runs periodically in the background, identifying and cleaning up unnecessary revisions to optimize storage and maintain repository performance.
  • Usage: Suitable for production environments as it doesn’t interrupt normal operations. Maintains two generations of revisions, allowing for rollbacks.
aem revision cleanup process

Revision Cleanup Process

Regardless of whether it’s online or offline, the cleanup process involves three phases –

EstimationEvaluates the potential space savings from removing old revisions.
Decide if proceeding with compaction is beneficial.
CompactionRewrites segments and tar files, excluding unused content.
Creates a more compact representation of the repository.
CleanupRemoves old segments and garbage data.
Frees up disk space.

Best Practices

  • Schedule online revision cleanup regularly. This prevents excessive disk space consumption.
  • Regularly check disk space to identify potential issues.
  • If disk space is critically low and online cleanup is insufficient, offline cleanup can be considered.
  • Always create a backup of your AEM instance before performing any cleanup.  
  • Online revision cleanup can impact performance. While it runs in the background, it might affect system performance during peak hours.  
  • Offline cleanup is a more time-consuming process. It requires careful planning and coordination.

Key Differences

FeatureOffline Revision CleanupOnline Revision Cleanup
AEM InstanceShutdown requiredNo shutdown required
Space ReclaimedMoreLess
ComplexityHighLow
FrequencyInfrequentRegular
Generations KeptOneTwo

Further References

Feel free to share your thoughts on this topic in the comments section below 👇 We would be happy to hear and discuss the same 🙂

Spread the word!
0Shares

Leave a comment

Your email address will not be published. Required fields are marked *