Skip Navigation

Syncthing alternatives

Hi,

As the title suggests: what are alternatives to syncthing that are basically fire and forget, works on multiple device types, and just focuses on file syncing?

I've had over the months the weirdest problems with syncthing, and lately I noticed some of my photos got corrupted, which is an absolute no no for me. I use syncthing currently as a easy automatic backup of documents, photos and other files, between my PCs and my phones (they all send only to the server. Folders are not shared with other devices).

64 comments
  • That's really weird. I've been using it for mobile-desktop-server-offsite sync for many years, with transfer sizes over 15TB, over WiFi, cellular, cable, fiber. I've never seen data corruption. Conflicts, sometimes. Permission issues, sometimes. Wiping something accidentally, sometimes. It's even more weird because Syncthing performs computes hash values for the files it manages. I don't know if it performs hash validation after copying remotely but if not, it can be forced manually which would tell you what's fucked and be pulled from the source, if it still exists.

    Nevermind, it verifies the result:

    When a block is copied or received from another device, its SHA256 hash is computed and compared with the expected value. If it matches the block is written to a temporary copy of the file, otherwise it is discarded and Syncthing tries to find another source for the block.

    According to this, if you have data corruption it can only occur between copying/moving a temporary file on your destination to another directory, or it could occur on the source itself. Both of those scenarios are a cause of concern and would likely persist with any utility. Moving or copying a file from one location to another on a sane machine should not corrupt it. If I were you I'd ensure my server doesn't eat bits. If not the storage media, it could be bit rot, or bad RAM.

    Just in case everything seems fine, let me tell you what I dealt with. I had a Ryzen 5950X machine with 32GB of RAM. It worked well since inception with no signs of RAM or data corruption issues. I test every new machine with Memtest86+. At some point I migrated the storage from Ext4 on LVMRAID to ZFS. All good. Then I wrote an alarm for Prometheus to tell me if there's any issues in ZFS. A week later I get an email about a ZFS error. I check the system - says checksum errors, data has been corrected, applications unaffected, run a scrub to clear. I ran a scrub. A few more checksum errors found, all corrected, we're clean now. There was a strong solar storm around that time, probably that. A couple of weeks later I get another email. Same symptoms, same procedure. No solar storm. Shit. Memtest86+ - pass. Hm. A couple of weeks later I get another. Same thing. Memtest again - nothing. This went on for several months. Meanwhile the off-site backup sees nothing like that. While running Memtest on another machine I noticed that the test passes following the first took longer than the first, a lot longer. I thought something might be wrong with that machine. Dug into it, got into Memtest's source code and discovered that the first pass is shorter on purpose so that it quickly flags obviously bad RAM. Apparently if you want to detect less obvious issues, you have to run multiple passes. OK. Memtest the main server again, pass 1: OK, pass 2: OK, pass 3: OK, pass 4: FAIL. FUCK. Memtest each stick separately for 4 passes: OK. Memtest 2 at a time: OK. Memtest all 4: FAIL. Alright, now we know why ZFS keeps finding checksum errors. Long story short, this machine could not run this RAM in 4-DIMM config. Replaced it with another RAM that's rated to run in 4-DIMM config on that processor. No more checksum issues. If I was running the older Ext4-on-LVMRAID storage stack, I would have caught NONE of these and it would have happily corrupted files here and there. In fact it likely did and I have some corruption. Moral of the story - run many Memtest passes and use checksumming storage stack like ZFS or Btrfs. I strongly recommend ZFS since its stripe RAID works fine unlike Btrfs'es. If you don't find bad RAM, start using it today, even if you're working with a single disk and add redundancy when you can. Only after change Syncthing for something else if you still somehow get corruption without ZFS'es knowledge. And if ZFS tells you that you have checksum errors, you likely have bad hardware.

  • I've not had files get corrupted, that's strange, for sure.

    Some options (but it really depends on what you're trying to do):

    Resilio Sync (cross-platform, battery eater on mobile, but has a useful feature - Selective Sync)

    FolderSync on Android (can also be battery intense)

    Native tools and scheduling on Linux and Windows.

    Maybe a review of the setup is in order, what your devices are, what you're trying to do. Sync may not be the tool for what you're trying to do.

    I use a combination of tools for different jobs and devices.

    Generally, all files on mobile are synced to home using Syncthing-Fork. For example, on Android I have a sync job("folder") in ST for every root folder on the device. These get synced to home depending on conditions (e.g. DCIM syncs over any network, any power condition, so I don't lose photos, while Backups and Download only sync on power over wifi, since they're big and not critical).

    Between desktop OS's I largely use OS-specific tools, because I don't really need sync there, but file copy and comparison on a schedule.

    After 10 years and probably 1TB+ of sync, I haven't lost any files via ST. Currently have 5 phones running jobs back to a server. I've even moved Syncthing from one server to another with no issues. With how ST works, I think file corruption is highly unlikely - it even handles in-use files safely.

  • FolderSync selectively syncs files/folders from my phone back to my server via ssh. Some folders are on a schedule, some monitor for changes and sync immediately; most are just one-way, some are two-way (files added to the server will sync back to the phone as well as uploading data to the server). There's even one that automatically drops files into paperless-ngx' consume folder for automatic document importing.

    From there BorgBackup makes a daily backup of the data, keeping historical backups for years with absolutely incredible efficiency. I currently have 21 backups of about ~550gb each. Borg stores this in 447gb of total disc space.

64 comments