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).

  • antihumanitarian@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    16 hours ago

    I had some similar and obscure corruption issues that wound up being a symptom of failing ram in a main server node. After that, only issues have been conflicts. So I’d suggest checking hardware health in addition to the ideas about backups vs sync.

  • Autonomous User@lemmy.world
    link
    fedilink
    English
    arrow-up
    15
    arrow-down
    1
    ·
    edit-2
    1 day ago

    Is Syncthing my ideal backup application?¶

    No. Syncthing is not a great backup application because all changes to your files (modifications, deletions, etc.) will be propagated to all your devices. You can enable versioning, but we encourage you to use other tools to keep your data safe from your (or our) mistakes.

    https://docs.syncthing.net/users/faq.html#is-syncthing-my-ideal-backup-application

    Sync is sync. Sync is NOT backup.

    • Nimrod@lemm.ee
      link
      fedilink
      English
      arrow-up
      1
      ·
      18 hours ago

      Would syncing your backup directory work? Like take snapshots of your system, dump the snapshots all in a single directory, and sync it to an off-site location?

      • milicent_bystandr@lemm.ee
        link
        fedilink
        English
        arrow-up
        1
        ·
        17 hours ago

        Kind of. That improves your backup safety, but doesn’t mitigate all the risks. E.g. if you accidentally delete everything from your backup directory, then all those deletions also happen on the sync’d one.

  • Avid Amoeba@lemmy.ca
    link
    fedilink
    English
    arrow-up
    39
    ·
    edit-2
    2 days ago

    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.

      • Avid Amoeba@lemmy.ca
        link
        fedilink
        English
        arrow-up
        4
        ·
        edit-2
        1 day ago

        Let me tell you about diagnosing a reproducible crash on that 5950X system after swapping the RAM with verified good modules. An issue I only discovered because I decided to warm myself using Folding@home for a couple of cold days while my building was switching the central heating on. 😂

    • halcyoncmdr@lemmy.world
      link
      fedilink
      English
      arrow-up
      16
      ·
      2 days ago

      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.

      I thought it was common knowledge that Memtest needed to be run for multiple passes to truly verify there are no issues. Seems that’s one of those things that stopped being passed down in the community over the years. Back when I was first learning about overclocking around 2005 that was emphasized HEAVILY, with the recommendation to run it at least overnight, and a minimum of 10 passes.

      • Avid Amoeba@lemmy.ca
        link
        fedilink
        English
        arrow-up
        6
        ·
        edit-2
        2 days ago

        It’s kind of embarrassing because I used to work as a service technician at a popular computer store in the 2000s and Memtest86+ has been a standard fare of testing. I guess outside of OC, the shorter first pass truly was enough to spot bad RAM in the vast majority of cases. Plus multichannel interactions were not nearly as prevalent in the DDR1/2/3 days. I recently installed 4 DIMMS for 128GB on an AM5 machine just to discover that the 5600 RAM only boots at 3600 in a 4-DIMM config, as per AMD’s docs. Could force it higher but without extra adjustment it can’t go beyond 4600 on this machine. Back in the day, different DIMMs, often with different chips worked in 2, 4-DIMM configs so long as they matched their JEDEC spec. backinmyday.jpg

        • halcyoncmdr@lemmy.world
          link
          fedilink
          English
          arrow-up
          2
          ·
          2 days ago

          Yeah AMD’s memory controllers, especially DDR5 seem to have a lot more difficulty at high speed with 4 slots filled. I used to plan upgrades around populating 2 slots and doubling if needed a few years later, instead now you really need to plan to ignore those slots if you are needing memory performance for things like gaming versus raw capacity.

          • Avid Amoeba@lemmy.ca
            link
            fedilink
            English
            arrow-up
            1
            ·
            2 days ago

            Yeah, I didn’t need 128GB, but as soon as I figured what’s going on with the 4-DIMM config, I ordered another kit to fill what I think I’d need for the lifetime of the system.

            • halcyoncmdr@lemmy.world
              link
              fedilink
              English
              arrow-up
              2
              ·
              2 days ago

              Similar issues even with just 2 DIMMs with some XMP/EXPO profiles not working on AMD systems because of board/CPU limits. It should technically work, but for whatever reason it just can’t handle it and speeds need to be dropped or the timings loosened a bit even though the RMA itself is rated for that.

              Not that the higher speeds are even necessary for 90% of users outside extreme overclocking. DDR5 6000 is basically where you reach diminishing returns anyway, and that’s often where that limit seems to appear.

              • Avid Amoeba@lemmy.ca
                link
                fedilink
                English
                arrow-up
                1
                ·
                2 days ago

                Ugh. And as far as I’m reading, we’re hitting limits with the connectors and interconnects so the next iteration up might require some type of CAMM interface. 😔

    • ZeDoTelhado@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      2 days ago

      That is some good info here. My HDD is totally fine (checked it very recently actually), as for the ram last time I checked was ok, but can check again to be sure

        • ZeDoTelhado@lemmy.worldOP
          link
          fedilink
          English
          arrow-up
          3
          ·
          2 days ago

          That is some crazy story right there. I do know for a fact that memtest needs multiple passes. But in my case the machine only has 1 stick of ram (used to have 2, one died). I will probably do a memtest overnight and get at you tomorrow.

          • halcyoncmdr@lemmy.world
            link
            fedilink
            English
            arrow-up
            12
            ·
            2 days ago

            (used to have 2, one died)

            That would make me immediately look to the RAM as the possible source or corruption. If it used to be a matched pair and one stick died, the odds of the other being on its way out are MUCH higher than normal. I would never trust that matched stick.

              • halcyoncmdr@lemmy.world
                link
                fedilink
                English
                arrow-up
                2
                ·
                1 day ago

                Crazy, thought for sure it would fail testing.

                Still wouldn’t trust it personally after a failed stick from a matched pair regardless of what the test says though.

                • Avid Amoeba@lemmy.ca
                  link
                  fedilink
                  English
                  arrow-up
                  1
                  ·
                  edit-2
                  1 day ago

                  Yeah. But it could be the board that burned it. But yeah, dead RAM is bad news, something is likely up. If I had data corruption and RAM didn’t show errors I’d begin swapping components. If the machine is cheap and swapping components would be too expensive or impractical, I’d swap the machine for another, like a cheap second hand Dell box.

  • ddash@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    47
    ·
    2 days ago

    I know this is unsolicited advice, so apologies for that, but did you consider that the issue could also be your server hard drive failing? I guess not a possibility if its really only recently synced pictures. Just wanted to throw that in.

    Regarding backing up photos, Immich works well for that but is also a lot more than just photo backup, so maybe not a preference for you.

    • DragonSidedD@lemmy.ml
      link
      fedilink
      English
      arrow-up
      22
      arrow-down
      1
      ·
      2 days ago

      I’d echo this. Syncthing is widely used because it Just Works in so many weird situations. So if it is Not Working, swapping out Syncthing might actually make the problem harder to solve.

    • ZeDoTelhado@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      9
      arrow-down
      1
      ·
      2 days ago

      That is actually a good question, in this case the HDD is totally fine. Thing is, the photos only get corrupted very rarely (probably 1 every 3000 or so, and only sometimes) and often photos that got transfered several times to the phone (usually the problem is in the phone. On the desktop never had that)

      As for immich, I do know about of but seems to be a bit much for what I need (and only photos AFAIK)

        • ZeDoTelhado@lemmy.worldOP
          link
          fedilink
          English
          arrow-up
          5
          ·
          2 days ago

          Had a pixel 8, and now a new pixel 9a. I think the problem is actually a bit messy. On my house I have several access points. There is a chance when syncthing is working, and I am going up or down, phone changes the access point. Syncthing possibly gets a ’ oppsie, didn’t finish that! Let’s go for the next one’ kind of issue. Of course, never looked into logs or anything so this is just pure speculation.

          Usually the kind of corruption on the photos is the kind that beginning is always there, but at some point gets replaced with gray, hence my theory about the files.

          • Onomatopoeia@lemmy.cafe
            link
            fedilink
            English
            arrow-up
            6
            ·
            2 days ago

            Yea, gotta be something odd with your setup.

            Currently I have one phone (of several) thats syncing en excess of 10,000 files, some only on Wifi (with 3 access points), some wifi/cell data.

            ST knows the state of a file, so a disconnect should have no effect. If you’re getting corrupted files, I wonder if something else is going on which may also affect another sync tool.

            Try Resilio for the same folders, see if you have the se problem (disable aybthing of course, otherwise conflicting edits will cause file corruption).

            • ZeDoTelhado@lemmy.worldOP
              link
              fedilink
              English
              arrow-up
              1
              ·
              1 day ago

              I checked their page and I have now a personal license. I am going later to try to find out how it works, so we will see

          • AtariDump@lemmy.world
            link
            fedilink
            English
            arrow-up
            3
            ·
            edit-2
            2 days ago

            Could be a bad AP.

            I once had a switch with a failing power supply that would corrupt MP3 artwork when writing to the MP3. That was a weird one to track down.

            • ZeDoTelhado@lemmy.worldOP
              link
              fedilink
              English
              arrow-up
              3
              ·
              1 day ago

              That sounds like a crazy story to find out what the issue was. As I stated somewhere on the thread, ram is not the issue, and the APS are quite new (Aruba stuff that is 1 and a half year old). And the only situation I get this issues is with my phones in specific. I will probably use the smb solution stated before and see how is goes. If the thing still happens, then is hunting time

  • sorter_plainview@lemmy.today
    link
    fedilink
    English
    arrow-up
    12
    ·
    edit-2
    2 days ago

    First and foremost Syncthing is not a ‘backup’ utility. Using it for backup is not at all recommended. Especially if you are dealing with Android or Raspberry pi, because the way clock / time works in these systems are pretty weird and create sync conflicts. So don’t.

    Now to the solution. For backup, use a proper backup solution like Kopia. Modern solutions support browsing the snapshots created as backups. Also creating periodic snapshots ensures better redundancy and better chance for disaster recovery.

    Now if you will not use it for backup, take a look at ‘Round Sync’ available in F-Droid. It’s an application built around the execptionally good app, ‘rclone’. It is some what similar to Syncthing, but designed in a very different way. Also it is more difficult to configure to copy the files to PC.

    I also wanted to mention that I have used Syncthing for many heavy lifting jobs and never faced issues with it. It is a feature complete app, with the philosophy of doing only one thing and doing it perfectly. So if you run into any issues, do reach out to forums or devs. They will definitely help you.

    • milicent_bystandr@lemm.ee
      link
      fedilink
      English
      arrow-up
      1
      ·
      17 hours ago

      Curious about your point about time conflicts. Doesn’t syncthing look at the change on your machine compared to the ‘canonical’ list also stored on your machine? So even if the timestamp is different, syncthing still detects the change, and the only problem is if the file is simultaneously modified on another machine before being propagated - which would be a conflict anyway.

      • sorter_plainview@lemmy.today
        link
        fedilink
        English
        arrow-up
        1
        ·
        13 hours ago

        It didn’t work like that for me. I must admit I didn’t dig deep to clearly see what is the problem. So my setup had a Windows Pc, a Raspberry Pi 5, and an Android phone, sharing a folder which had notes.

        Whenever I save any changes in Windows machine, the android used gets updated without much issue, but the Raspberry Pi caused conflicts. When looked at the time stamps they were different and it looked to me like the Raspberry Pi 5 Syncthing is sending the old file as new one, because of the save time.

        It read somewhere the issue is with how time is handled in Rasberry Pi. So I disabled the Raspberry Pi Syncthing and went on, because that was not really needed.

    • ZeDoTelhado@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 days ago

      From what I see, kopia is for the desktop. Unless I didn’t see something, it is not available for android, which is where more important to have backup in my case

      • sorter_plainview@lemmy.today
        link
        fedilink
        English
        arrow-up
        2
        ·
        2 days ago

        Aah my bad… I was half asleep. What I meant was use Round Sync / Syncthing to copy files to pc and then use Kopia to backup. Round Sync can do one direction copying, so source files are not corrupted.

        • ZeDoTelhado@lemmy.worldOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 day ago

          That is something I can totally do after I figure out this syncthing thing. Probably will use Borg backup but same principle applies

  • the_wiz@feddit.org
    link
    fedilink
    English
    arrow-up
    4
    arrow-down
    1
    ·
    2 days ago

    I am using rsync triggered by cronjobs for this task now for… well… nearly forever.

    • milicent_bystandr@lemm.ee
      link
      fedilink
      English
      arrow-up
      2
      ·
      17 hours ago

      If you ask Syncthing how to do local sync (e.g. to an external HDD), the answer is, use the right tool for the job: Unison.

      If you ask Unison how to do certain things (directory timestamps is the one I miss), the answer is, use the right tool for the job: rsync.

      In the end, it all comes down to rsync.


      P.S. I’m actually gradually migrating up the chain from rsync, having used my own hand-built utility to make convenient rsync commands, but now using syncthing and Unison more.

  • ShortN0te@lemmy.ml
    link
    fedilink
    English
    arrow-up
    5
    ·
    2 days ago

    Really surprised about this. I am using syncthing now for many years on various devices and never encountered issues with it. And also, file sync is not a backup solution.

  • Onomatopoeia@lemmy.cafe
    link
    fedilink
    English
    arrow-up
    5
    ·
    2 days ago

    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.

  • hera@feddit.uk
    link
    fedilink
    English
    arrow-up
    4
    ·
    2 days ago

    This seems very odd, I’ve been using syncthing for a good 5 years and never had a single file corrupt - might be worth opening an issue on their github

    • ZeDoTelhado@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 days ago

      I could try to do that, but I simply do not have reproducible steps that are certain to make the problem happen. I am a developer myself, and I absolutely despise when someone says ‘hey, something random happened the other day. I cannot say what are the steps, but it is there’ just to find out in the end nothing is there, or is simply not reproducible no matter what and for reasons that I might never find out

      • hera@feddit.uk
        link
        fedilink
        English
        arrow-up
        1
        ·
        2 days ago

        Someone might recognise your issue though and have suggestions, even if you can’t reproduce it exactly

  • Darkassassin07@lemmy.ca
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    2 days ago

    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.

  • NaibofTabr@infosec.pub
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    1
    ·
    2 days ago

    Ah, just one question - is your current Syncthing use internal to your home network, or does it sync remotely?

    Because if you’re just having your mobile devices sync files when they get on your home wifi, it’s reasonably safe for that to be fire-and-forget, but if you’re syncing from public networks into private that really should require some more specific configuration and active control.

      • NaibofTabr@infosec.pub
        link
        fedilink
        English
        arrow-up
        1
        ·
        2 days ago

        Encrypting the connection is good, it means that no one should be able capture the data and read it - but my concern is more about the holes in the network boundary you have to create to establish the connection.

        My point of view is, that’s not something you want happening automatically, unless you manually configured it to do that yourself and you know exactly how it works, what it connects to and how it authenticates (and preferably have some kind of inbound/outbound traffic monitoring for that connection).

    • ZeDoTelhado@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      2 days ago

      Great question. I forgot to mention but at this point syncthing is only accessible on my WiFi at home. No VPN to it and no remote locations.