Is it possible to disable versioning for a folder or remove versions of it?

My use case:
I have a huge music library (35k songs) and sometimes I change the tags of my mp3 files to organize them.
But I don’t need to have versions of changed files.
As I started early using high quality (320 kBit/s) of encoding the versions are using a lot of space. Wasted space in my use case here.

So now the question :question: is:
Can I disable versioning for a folder and its content?

If no, how to remove versions of files of given folder?

I read Controlling file versions and aging — Nextcloud latest Administration Manual latest documentation and Version control — Nextcloud latest User Manual latest documentation without finding any hint about my intention.

Nextcloud version (eg, 20.0.5): v24.0.5
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04 LTS
Apache or nginx version (eg, Apache 2.4.25): replace me
PHP version (eg, 7.4): 7.4

Just looked at the occ options of the versioning app.

  Command "versions:" is ambiguous.                      
  Did you mean one of these?                             
      versions:cleanup Delete versions                   
      versions:expire  Expires the users file versions.                                                       

No obvious solution for my case.

Another thought is to just delete the version file from the data dir.
Does someone know if the versions are stored inside the db?
Is it safe to just remove the files?

I delete all the version files on my servers to recover disk space.
As for long term damage to database I would be interested to know as well?
You can turn this feature off.

Your post did not contain a questionmark.
Was ist just a comment or do you have questions?

@rakekniven yes a question.

I have had my systems warn me about low disk space serveral times now because the Versioning has consumed all of the free space available.

Would it be possible for Versioning to use a maxium percentage of free space?
This would save me from going in and deleting the files manually.

I think that is not possible. But it would be a nice feature. Maybe someone can create an issue here. Why 50%? Seems pretty arbitrary to me. But maybe you can change it directly somewhere in the source code. Maybe someone can find out where it is.

But please read this.

You can set in config.php e.g.

'versions_retention_obligation' => '30,60'

Versions should then be stored for at least 30 days and deleted after 60 days. However, I have not tried this myself. Perhaps you will find values that bring you closer to your ideas of versioning.

2 Likes

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.

After reading I think the problem is when the user has an unlimited quota.
I will run a test soon with and without quota.

1 Like