Optimal way to do one way sync?

Hi all! I know I posted here previously on the topic and it has been a while but looking at this from a different angle trying to find the optimal way separate from what I’ve got going now. The previous explanations were very good helping me understand the issues I was running into, namely simple file renames resulting in full files being transferred which seems to all boil down to the ignoreDelete option I’m using.

Here’s my intended goal: I have endpoints A and B. B is essentially the backup server in this case for A.

I’d like to make it so A does a one way sync to B. I also, crucially, want A to have the option to rename files as needed and send those renames to B without sending over the whole file again. I also want to make it so any changes, especially deletes from a folder (in this case it’ll likely be moves to a more permanent ‘archive’ folder) on B, do not traverse to A. Also any deletes from A do not traverse to B.

I’d have to check the current config on A to be sure, but B is set up as a receive only and I believe A is set up with ignoreDeletes turned on.

I’m just trying to figure out if such an option is even possible first and how such a thing can be configured.

Thanks!

  • One way sync (source): Yes, a Send Only folder
  • Rename files as needed: Yes, when a file is renamed, Syncthing will (if I have this right) send a file deletion and creation, and the other Devices syncing that Folder will use existing file blocks to rebuild the file, transmitting only the metadata
  • One way sync (destination): Yes, a Receive Only folder
  • Preventing deletes from propagating from B to A: Yes, that’s a feature of Send Only and Receive Only folders
  • Preventing deletes from propagating from A to B: Yes, well sorta, I would suggest you look closely at File Versioning (File Versioning — Syncthing documentation); I suspect that you will want to use something in addition to Syncthing to back up the files on B
1 Like

That’s awesome! Honestly the whole ‘file renames resending the file’ was the biggest headache. I think the last point I can manage without messing with file versioning. Short version is this is basically a Twitch recording backup for a friend’s channel I manage. And if he has to delete stuff (side A) it’s because his dedicated recording drive has filled so we can plan that out and I move things off into an archive folder on B before he does his deletes.

Thanks so much for making it clear and understandable. :slight_smile:

1 Like

Hmmm… I hope people don’t get tired of me saying this, but Syncthing in itself is not a backup program. I believe you would be better of using a proper backup program.

  • Either by backing up your friends recordings “at the source”
  • or by using Syncthing in a regular “no frills” configuration (Send Only at your friend’s place and Receive Only at your place) and then backup the synchronized copy at your end. This will get you control over all different backup-related things like retention time, snapshots, history etc. And lastly, it would also (if done right) protect you from ransomware.

Don’t fall inte the “a synchronized copy is my backup” trap, because in reality it is a catastrophy waiting to happen.

1 Like

I use the term ‘backup’ loosely in this regard, but this is essentially what is happening. It’s more of a bulk storage destination compared to the limited space he has and how often he streams. Goes to my unRaid box then gets regular backups to Backblaze along with other data I have stored.

1 Like