Fix: Cleanup not removing old files from staggered file versioning

Today I noticed that old files (ranging back to 2021) are not removed from staggered file versioning after maximum age.

My settings: max. age: 365 days, cleanup interval: 86400 (= 1 day)

I changed max. age to 60 days, but nothing happened. Then I changed the cleanup interval to 1 and suddenly the old files were removed as expected.

:mag: The real reason was not the cleanup interval itself, but rather the circumstances: my office computer runs ~8-9 hours per day, so the initial setting was too long. I assumed that cleanup interval counts from last run, but it seems that it is counted from start of Syncthing - so it never cleaned up. :face_with_monocle:

A little improvement would be to show β€œlast cleanup: <timestamp>” somewhere - maybe in edit folder modal directly next to the setting? This way the user knows if cleanup runs as expected (or not, like in my case)

Hope this helps other readers too!

1 Like

I think it’s a similar problem to https://forum.syncthing.net/t/when-does-cleanup-trigger-trash-can-versioning/20562. A possible solution would be to always run cleanup on startup, after scanning the folder.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.