File versioning - What happens if the versioning type is changed


I have a question on the file versioning behaviour:

Let’s say I have an 1 GB file in my syncing repository and have set the file versioning to “simple file versioning” with 10 versions. Hence, after some changes to the file, I will end up with 10 1 GB files in the versions folder. Now let’s say, this is too much space taken and I’d like to…

  1. Delete all versioned files comfortably. Is there an option in the command line or the GUI, or is it boiling down to manually deleting the version folder? Will it be recreated when I restart syncthing?

  2. Switch to “staggered file versioning” with a holding time of only 2 days for the sake of saving disk space (to allow me to go back if I accidentally change the file and want to go back immediatelly). What happens to the versions that were created during the time when “simple file versioning” was active? Will they be deleted or will they stay? Assuming I have made one change to the file hand have hence one version in the versions folder. What happens on day 3? Will the “oldest” version survive, or will the file be deleted, since it is older than 2 days? I assume the versions folder will be empty at day three… is that right?

Thank you!

Cheers, MCB

For 1, you can just delete the folder and it should be fine. For 2, when you switch (given you remove the files) it should just start from scratch.

I cannot recall how exactly it’s implemented. Is there nothing about it in the wiki?

that is correct

they should also stay for 2 days, but i think “simple” uses modification time for the date and “staggerd” uses then time when the versioning happend (to be sure that the version is kept for X days) so they could be also deleted earlier because modification time older than 2 days could also be right after creating the version…