Retention of local folders

Hey there! Just wanting to do a quick sanity check to see if this scenario plays into how syncthing operates.

I have 2 file servers, one at 20TB and another at 10TB.

And a few folders that total up to nearly 10TB, which means this all isn’t going to easily fit on the second server.

Currently have syncthing configured to ‘send/receive’ from the big server, and ‘receive only’ from the littler server.

The ideal plan, would be to only keep the latest X files/directories (managed through another process) and delete any older ones (basic retention of data).

Now I can just disable all the automatic/periodic scanning on the smaller server, so syncthing just keeps getting new files as they come down. But when I click ‘scan now’ or similar, it very obviously tells me there’s local conflicts (missing files), which makes 100% sense and is how syncthing works.

Is there any sort of day to have syncthing ignore local deletes of files, but still receive new changes they come down? (including new files that replace existing ones that might have been deleted locally, etc).

Or is this usecase just simply not catered for within syncthing.

It’s not particularly well catered for.

There is an ignore deletes option which doesn’t do what you would like, but rather ignores incoming delete updates announced by other devices. As long as you have just your two devices you could set this option on your “big” server, and let the “small” one process the deletes as usual, in send-receive mode. It will know about the deletes and tell the other side, who will not care. You might want to set the other side in send-only mode. And you might run into corner cases.

In general it seems you are abusing syncthing for something it’s not made for. Perhaps a periodic rsync is a better option for what you are trying to achieve.

Thanks @calmh, your suggestion sounds plausible, I’ll definitely give that a go.

I really like the overall experience of Syncthing with all the bells and whistles it comes with (UI, folder management, sharing, etc), and for my overall use case it fits very well, meshes of servers sharing with each other!

You’ll never get something that fits perfectly, but Syncthing gets me much closer to my ‘perfect tool’ than a crontab of rsyncs (which is where I’ve come from).

But having said all of that, it’d be nice if Syncthing catered for the fact that some devices have limited storage space and there was a ‘solution’ for this, be it that ‘small’ device implementing it’s own retention or Syncthing implementing a ‘last X items/days/etc worth of content’ (I know, submit a PR, it’s OSS, etc)

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