Skip to content

🧹 Clean-Up File Versions #1419

Done
0 of 1 issue completed
Done

Description

@tbsbdr

Description

User Stories

  • As a user I want old file versions to be cleaned up so that the quota is used efficiently while still keeping important versions available.

Value

  • save storage space

Acceptance Criteria

  • Trigger: cleaning up versions gets triggered

    • when writing a file, for exactly this file, but asynchronous / non-blocking for writing the file
    • when invoked via cli, for the files, folders, spaces or everything as specified in the cli command arguments
  • Default versions clean-up pattern

    1. Last minute one version is kept every 10 seconds
    2. Last hour one version is kept every minute
    3. Last 24 hours one version is kept every hour
    4. Last 30 days one version is kept every day
    5. Older than 30 days one version is kept every week
  • Config: The default cleanup-pattern can be changed via config

    • auto Default, default clean-up pattern applies
    • D, auto Keeps versions at least for D days, apply default clean-up pattern to all versions that are older than D days
    • auto, D Delete all versions that are older than D days automatically, delete other versions according to expiration rules
    • D1, D2 Keep versions for at least D1 days and delete when they exceed D2 days.
    • disabled Disable version retention; no files will be deleted.

Alternative, simplified approach:

  • purge all versions older than 14 days (should be configurable)

Definition of ready

  • Everybody needs to understand the value written in the user story
  • Acceptance criteria have to be defined
  • All dependencies of the user story need to be identified
  • Feature should be seen from an end user perspective
  • Story has to be estimated
  • Story points need to be less than 20

Definition of done

  • Functional requirements
    • Functionality described in the user story works
    • Acceptance criteria are fulfilled
  • Quality
    • Code review happened
    • CI is green (that includes new and existing automated tests)
    • Critical code received unit tests by the developer
  • Non-functional requirements
    • No sonar cloud issues
  • Configuration changes
    • The next branch of the OpenCloud charts is compatible

Sub-issues

Sub-issues

0 of 1 Issues completed
Loading 1 sub-issues

Activity

  1. changed the title [-]Clean-Up Versions[/-] [+]🧹 Clean-Up Versions[/+] on Aug 28, 2025
  2. changed the title [-]🧹 Clean-Up Versions[/-] [+]🧹 Clean-Up File Versions[/+] on Aug 28, 2025
  3. moved this from Qualification to Backlog in OpenCloud Team Boardon Oct 22, 2025
  4. RoroTitiFR commented on Jan 11, 2026

    @RoroTitiFR

    This implementation is nice, it should be implemented.
    This is really a must feature.

  5. bernhardkaindl commented on Jan 15, 2026

    @bernhardkaindl

    @tbsbdr, the list of implemented features describes the basic minimum of this feature as if it would already be available:

    https://docs.opencloud.eu/docs/admin/welcome/features#versioning-and-recovery:

    Versioning and Recovery

    Every change is automatically saved as a version and can be restored at any time. Administrators can define how many versions to keep and the rules for deleting older versions.

    But, as this bug shows, this is apparently not the case.

    If this is correct, the only way to recover the space occupied by older versions may be:

    1. Copy files that could have versions to another space
    2. Delete those files
    3. Empty the trash bins of the affected spaces
    4. Copy the files back
    5. Delete the copied files in the temporary location

    I suggest as a first immediate remediation to implement only (of course to be extended as planned later):

    • A configuration of a simple count of versions to keep (per space)
    • Delete the versions that should no longer be kept when the value is reduced.

    That would allow users to make room for new data to be stored when there is not enough space for older versions.

    It would also be useful to have:

    At or below the admin menu for deleted files,
    there should be a one-shot option for cleaning up older versions

    • up to a given minimum age in terms of time (most helpful, this is what e.g. Seafile implements)
      (older than x days, hours, minutes)
    • up to a given minimum age in terms of generations
      (older than x versions)
    • (possibly limited until a given amount of space is reclaimed, but that is probably overkill)

    Also to consider:

    When configuring a quota for a space:
    there should be the option like this:

    When the quota is exceeded when storing new data (radio-boxed or so):

    • keep old versions and fail as long as the quota is exceeded
    • clean-up older versions as needed to store the new data within the limits of the quota.
  6. agent00bob commented on Jun 30, 2026

    @agent00bob

    @tbsbdr Would really like to see something get implemented here. This is a massive problem for me. I have a space that I use for storing and syncing my app folders for docker containers. Every write to a db is causing versioning and it's completely opaque. I'm up to 1TB of data in the blobs on a folder that's less than 100MB. Additionally, I have set a quota for that space of 100GB, but this versioning system doesn't seem to respect that quota which is a pretty confusing user experience. And as @bernhardkaindl mentions, the website is misleading in the this regard. That second sentence needs to be deleted at least until these controls are implemented. For now, I'll use OC_DISABLE_VERSIONING and leverage ZFS snapshots on the server side.

    EDIT: It appears the UI reports apparent size of 1 TB while the actual disk blocks used is ~69GB. Still, 69GB for a space less than 100MB is an excessive amount of versions I don't care to keep.

  7. forkrails commented on Jul 10, 2026

    @forkrails

    @tbsbdr @kulmann is this just a dead end idea then? So many issues about this have been opened, but no progress here.

    Right now file versions just build up infinitely. Neither user or admin can clean up file versions, and admins can't even limit file version storage. Quotas don't limit file versions it seems, so a user can use up all the storage available if they desire.

    This is not a feature request, its a bug, and a pretty clear one. I am surprised how this sort of software limitation can be accepted in an enterprise setting.

  8. kulmann commented on Jul 14, 2026

    @kulmann
    Member

    We have very, very limited capacity at the moment. But we know that this one is important. It will happen. But I can't give you anything about a timeline, although I would like to. Will circle back to this when things clear up. It is indeed helpful for us that this issue has 12 heart-emojis because it shows the urge for a solution.

  9. forkrails commented on Jul 16, 2026

    @forkrails

    @kulmann I understand that there is limited bandwidth, sure.

    But this is not a recent issue. The version history issue has existed for years. People have complained about this issue since owncloud, so it’s been known for multiple years. You guys have shipped lots of features in this time, including the random n8n integration. So I just don’t understand why this is a low priority task.

  10. 20 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions