From 02dfcf09be2d323152890b1166f2e83f685d8dae Mon Sep 17 00:00:00 2001 From: yemkareems Date: Mon, 13 Oct 2025 12:11:26 +0530 Subject: [PATCH 1/4] fix: add note about change in behaviour of the job --- .../configuration_files/file_versioning.rst | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/admin_manual/configuration_files/file_versioning.rst b/admin_manual/configuration_files/file_versioning.rst index 273075a2a22..c1d35de9edf 100644 --- a/admin_manual/configuration_files/file_versioning.rst +++ b/admin_manual/configuration_files/file_versioning.rst @@ -54,4 +54,22 @@ Deactivate background job: ``occ config:app:set --value=no files_versions backgr Activate background job: ``occ config:app:delete files_versions background_job_expire_versions`` -Expire versions: ``occ versions:expire`` or ``occ versions:expire --quiet`` (without the progress bar) \ No newline at end of file +Expire versions: ``occ versions:expire`` or ``occ versions:expire --quiet`` (without the progress bar) + +.. note:: + +*Deviations in behavior: “job run” vs “auto-expiry”* + +The ``versions_retention_obligation`` setting behaves slightly differently +depending on whether version expiration is triggered by an *explicit job run* +(for example, via ``occ versions:expire`` or a scheduled background job) or by +*automatic expiry*. + +Explicit job-based expiration is *strict* and adheres closely to the configured +``versions_retention_obligation``. + +Auto-expiry follows the same retention principles but may apply them more flexibly, allowing minor deviations when +necessary to maintain adequate free storage space. + +This distinction can lead to different results depending on whether cleanup is +performed automatically or manually. \ No newline at end of file From 4917b8bbd0cd296f6678b5ed2f58b67bd67099af Mon Sep 17 00:00:00 2001 From: yemkareems Date: Thu, 23 Oct 2025 14:18:47 +0530 Subject: [PATCH 2/4] fix: added the paragraph above note --- .../configuration_files/file_versioning.rst | 42 +++++++++---------- 1 file changed, 19 insertions(+), 23 deletions(-) diff --git a/admin_manual/configuration_files/file_versioning.rst b/admin_manual/configuration_files/file_versioning.rst index c1d35de9edf..72d94725397 100644 --- a/admin_manual/configuration_files/file_versioning.rst +++ b/admin_manual/configuration_files/file_versioning.rst @@ -21,6 +21,20 @@ The Versions app never uses more than 50% of the user's currently available free space. If the stored versions exceed this limit, Nextcloud deletes the oldest file versions until it meets the disk space limit again. +The ``versions_retention_obligation`` setting behaves slightly differently +depending on whether version expiration is triggered by an *explicit job run* +(for example, via ``occ versions:expire`` or a scheduled background job) or by +*automatic expiry*. + +Explicit job-based expiration is *strict* and adheres closely to the configured +``versions_retention_obligation``. + +Auto-expiry follows the same retention principles but may apply them more flexibly, allowing minor deviations when +necessary to maintain adequate free storage space. + +This distinction can lead to different results depending on whether cleanup is +performed automatically or manually. + .. note:: Versions named by a user will never be deleted. You may alter the default pattern in ``config.php``. The default setting is @@ -30,12 +44,12 @@ You may alter the default pattern in ``config.php``. The default setting is Additional options are: -* ``D, auto`` - Keep versions at least for D days, apply expiration rules to all versions +* ``D, auto`` + Keep versions at least for D days, apply expiration rules to all versions that are older than D days -* ``auto, D`` - Delete all versions that are older than D days automatically, delete other +* ``auto, D`` + Delete all versions that are older than D days automatically, delete other versions according to expiration rules * ``D1, D2`` @@ -54,22 +68,4 @@ Deactivate background job: ``occ config:app:set --value=no files_versions backgr Activate background job: ``occ config:app:delete files_versions background_job_expire_versions`` -Expire versions: ``occ versions:expire`` or ``occ versions:expire --quiet`` (without the progress bar) - -.. note:: - -*Deviations in behavior: “job run” vs “auto-expiry”* - -The ``versions_retention_obligation`` setting behaves slightly differently -depending on whether version expiration is triggered by an *explicit job run* -(for example, via ``occ versions:expire`` or a scheduled background job) or by -*automatic expiry*. - -Explicit job-based expiration is *strict* and adheres closely to the configured -``versions_retention_obligation``. - -Auto-expiry follows the same retention principles but may apply them more flexibly, allowing minor deviations when -necessary to maintain adequate free storage space. - -This distinction can lead to different results depending on whether cleanup is -performed automatically or manually. \ No newline at end of file +Expire versions: ``occ versions:expire`` or ``occ versions:expire --quiet`` (without the progress bar) \ No newline at end of file From bf204aeaeceb79dea4b352647443e310cdecee08 Mon Sep 17 00:00:00 2001 From: yemkareems Date: Wed, 5 Nov 2025 13:32:04 +0530 Subject: [PATCH 3/4] fix: change in text as required for file creation and background job --- .../configuration_files/file_versioning.rst | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/admin_manual/configuration_files/file_versioning.rst b/admin_manual/configuration_files/file_versioning.rst index 72d94725397..951cda2ce80 100644 --- a/admin_manual/configuration_files/file_versioning.rst +++ b/admin_manual/configuration_files/file_versioning.rst @@ -21,19 +21,19 @@ The Versions app never uses more than 50% of the user's currently available free space. If the stored versions exceed this limit, Nextcloud deletes the oldest file versions until it meets the disk space limit again. -The ``versions_retention_obligation`` setting behaves slightly differently -depending on whether version expiration is triggered by an *explicit job run* -(for example, via ``occ versions:expire`` or a scheduled background job) or by -*automatic expiry*. +Nextcloud manages file versions using a combination of on-save pruning and scheduled cleanup. This ensures that versions are retained while respecting storage quotas. -Explicit job-based expiration is *strict* and adheres closely to the configured -``versions_retention_obligation``. +During Version Creation +---------------------- -Auto-expiry follows the same retention principles but may apply them more flexibly, allowing minor deviations when -necessary to maintain adequate free storage space. +Nextcloud automatically creates new file versions whenever a file is modified, allowing users to restore previous states when needed. After each new version is stored, the system automatically checks storage limits and retention rules. Versions are filtered according to the above pattern to keep representative versions and remove redundant ones. If the user’s quota is exceeded, auto-expiry is triggered. +When storage space runs low, Nextcloud sorts all versions from oldest to newest and removes the oldest ones first, while always preserving at least the two most recent versions to free up space. -This distinction can lead to different results depending on whether cleanup is -performed automatically or manually. +During the Regular Background Job +--------------------------------- + +Nextcloud runs a background cleanup task that automatically removes old file versions for each user. During this process, the system checks the user's version storage folder and identifies versions that are older than the configured maximum retention period or whose original files no longer exist. +When an outdated or orphaned version is found, it is safely deleted from both the filesystem and the version database to reclaim storage space and maintain consistency. .. note:: Versions named by a user will never be deleted. From d6bd7038a3e189f53a502b180e7e52dadc7bef6c Mon Sep 17 00:00:00 2001 From: yemkareems Date: Wed, 5 Nov 2025 13:44:00 +0530 Subject: [PATCH 4/4] fix: title underlying too short build error fix --- admin_manual/configuration_files/file_versioning.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin_manual/configuration_files/file_versioning.rst b/admin_manual/configuration_files/file_versioning.rst index 951cda2ce80..7bd02fd5b96 100644 --- a/admin_manual/configuration_files/file_versioning.rst +++ b/admin_manual/configuration_files/file_versioning.rst @@ -24,7 +24,7 @@ oldest file versions until it meets the disk space limit again. Nextcloud manages file versions using a combination of on-save pruning and scheduled cleanup. This ensures that versions are retained while respecting storage quotas. During Version Creation ----------------------- +----------------------- Nextcloud automatically creates new file versions whenever a file is modified, allowing users to restore previous states when needed. After each new version is stored, the system automatically checks storage limits and retention rules. Versions are filtered according to the above pattern to keep representative versions and remove redundant ones. If the user’s quota is exceeded, auto-expiry is triggered. When storage space runs low, Nextcloud sorts all versions from oldest to newest and removes the oldest ones first, while always preserving at least the two most recent versions to free up space.