Versions cleaner icon
Module Id
versions-cleaner
Group Id
org.jahia.community
Updated
Requires Jahia
8.0.0.0
Author
Florent BOURASSE
Category
Tools and Utilities
Status
COMMUNITY info

Versions cleaner group_work

Jahia module to clean versions by:

  • keeping the last N versions
  • removing the orphaned versions

Dependencies & Dependants

Dependencies
  • NONE
Dependants
  • NONE

FAQ

How to use?

Always execute during a maintenance period when no contribution is being done.

Background job

Properties:

Name Value Description
jahia.versions.cleaner.job.reindexDefaultWorkspace false Reindex default workspace before cleaning
jahia.versions.cleaner.job.checkIntegrity false Check integrity of the versions
jahia.versions.cleaner.job.nbVersionsToKeep 2 Number of versions to keep
jahia.versions.cleaner.job.maxExecutionTimeInMs 0 Max execution time in ms
jahia.versions.cleaner.job.deleteOrphanedVersions false Delete orphaned versions
jahia.versions.cleaner.job.cronExpression 0 30 1 * * ? Crontab expression for the job

Commands

cleaners-version:keep-n

Delete all versions except the last N ones

Options:

Name alias Mandatory Value Description
-r --reindex-default-workspace   false Reindex default workspace before cleaning
-c --check-integrity   false Check integrity of the versions
-n --nb-versions-to-keep   2 Number of versions to keep
-t --max-execution-time-in-ms   0 Max execution time in ms
-o --delete-orphaned-versions   false Delete orphaned versions

Example:

versions-cleaner:keep-n 

How To Install

  • In Jahia, go to "Administration --> Server settings --> System components --> Modules"
  • Upload the JAR versions-cleaner-X.X.X.jar
  • Check that the module is started

License

MIT License

Copyright (c) 2022 - present Florent BOURASSÉ

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.