I have been using Syncthing since prior to the introduction of receive only folders, but I see a lot of questions from people trying to use Syncthing that seem to set up these specialist folder types and I have yet to see any use case that appeals to me. Obviously this is somewhat dependent upon your personal situation but I’m hoping to get some thoughts that might broaden my horizons about what situations Syncthing is useful for. Thanks!
I have two cases where I use one-way sync in Syncthing.
One case is syncing photos made on my mobile devices. The folder I use for this is receive-only on my server (well, a Raspberry PI in a cupboard, but I call it a “server” for the sake of cool), send-receive on phones, and send-only on a tablet that has tiny storage. There’s a cron job (actually, a systemd timer) on the server that moves the photos from this folder to photo collection folder that is then synced to PCs and laptops. Having the folder RO on the server makes sure the photos don’t get deleted on mobile devices as soon as they are moved off to collection (and by the time I remove them from mobile to free up space they’re safely in the collection already), and having it SO on the tablet makes sure the storage space on the tablet is not cluttered up by the photos made on other devices.
Another one of my usecases could actually do without one-way sync, but I still have it just to make sure. The abovementioned server has a backup system set up on it (which includes rsnapshot, a RAID of attached disks, and some other things), and since it is also a 24/7 Syncthing instance, all the shared folders are backed up, too. Hovewer, I have a couple directories on my home PC and my primary laptop that are not shared with other machines. To have those backed up too, I shared each one of them with the server, so that the server always has an actual copy that it can back up. These are SO on the machines. This could be a two-way sync, of course, since the files are not meant to be modified on the server anyway, but I have set them to one-way sync just to be double-sure.
I use lots of one way syncing to what are essentially backup devices. That’s with “send only” and I think that’s the correct solution for almost all one-way setups.
In a few places there are one-way sync relationships that pass multiple levels. Like this:
│ A │
│ B │◀───────────▶│ C │
▼ ▼ ▼ ▼
┌───────┐ ┌───────┐ ┌───────┐ ┌───────┐
│ D │ │ E │ │ F │ │ G │
└───────┘ └───────┘ └───────┘ └───────┘
I want changes from A on all of D-G, but I don’t want changes from D to propagate to neither E nor F nor G. A can be send-only, but B and C must be send-receive (or potentially receive-only). That leaves receive-only as the option for D-G.
(We assume D-G aren’t malicious, just that stuff might happen there that we don’t want to propagate.)
I use “Send Only” to upload backups from multiple Android devices to a desktop PC, where the same folders are configured as “Receive Only”. This is just to be extra sure that no changes are made to the files externally.
At the moment, I also have one folder set to “Receive Only”, where I am syncing 300 GB of data from the other side of the globe. The upload speed on the other side is only 25 KB/s, so the sync process is likely going to take a few months, and I find Syncthing the most convenient to send such a large amount of data. Once completed, the remote folder is to be removed completely, so I am not interested in pushing any local changes to it.
I want to have media (photo library) content “safe” at the NAS from client (Win PC) side changes. Many apps want to write to content files without asking permission. Therefore clients should be “Receive only” and the NAS/server “send only”.
I use this mode for selected orders to be sure that the content of the “send-only folder” absolutely matches the connected peers and that everything else in the recipient folder is deleted.
As an example, I take Wordpress, whose installation and content are transferred from a production system to a backup system. This helped me a lot because my productive system had broken down, so I just had to switch and the contents of Wordpress were accessible again in a very short time and were up to date.
Another nod here for photo/family stuff backup. Receive only with file versioning on ZFS. In several places. A syncs to receive only B and C but B and C don’t sync to each other in case of corruption or deletion or a nasty getting in etc.
Backups of A, B and C are also made. Think of them as redundancy boxes like a ZFS arrays redundant disks.
It’s highly unlikely that all 3 locations will burn down and the bank vaults with the backups too. Bar nuclear war, I’m almost as sure as I can be that I’m not losing the photos of my kids growing up.
My setup is similar to many of the others described here. I have folders on my mobile device set to Send-only if I want them backed up to my PCs or anywhere else. On the PC end, I don’t use Receive-only, but I do enable one of the “trash can” options, so when I delete the file on my phone, I can just pull it out of the trash.
Mine is also similar. I have Syncthing on my Android phone and macOS laptop.
/DCIM is Send Only on Android, Receive Only + Ignore Deletes + Simple Versioning (with 9999999999 versions) on macOS.
/ has the same setup with the exception of ignoring /DCIM, /Android and /Syncthing.
/Syncthing contains my all other Syncthing folders. /Syncthing/Mobile Sync is Send and Receive for whenever I need two way synching, and /Syncthing/Mobile Backup is Send Only for applications that take regular backups to a file (because it’s nice to have all app backups in a single place).
I semi-manually move things from my laptop to external hard drives before deleting them from my phone.
How did you implement this? In my case I want to share a folder between my laptops and my server. The laptops should accept changes from each other but not from the server, is this doable at the time of writing?