from Hacker News

Show HN: Saf – simple, reliable, rsync-based, battle tested, rounded backup

by binaryapparatus on 8/18/23, 9:19 PM with 24 comments

I had this backup code working reliably for years, using local file system, vps/dedicated server, or remote storage for backup, then I finally get time to wrap README, iron few missing switches and publish. Should be production ready and reliable, so it could be useful to others. Contributors are welcome.

<https://github.com/dusanx/saf>

  • by BoppreH on 8/19/23, 8:33 AM

    How do you automate the checking if the backup worked correctly, in face of saf bugs, rsync bugs/misconfiguration, or bit rot?

    My solution is to pick a few random files (plus whatever is new), and compute their hashes on both local and remote versions. But it's slow and probabilistic. ZFS also helps, but I feel it's too transparent to rely on (what if the remote storage changes filesystem).

  • by otterpro on 8/19/23, 1:01 PM

    Wow, I like this a lot, as it looks easy to run and it can sync to multiple targets. My local backup consists of JBOD (not RAID, ZFS or BTRFS) so I think this should work nicely. I've been using a shell script for doing something similar for backup, but it lacked a lot of the features.
  • by killingtime74 on 8/19/23, 2:23 AM

    It might be safer to use an rsync lib that calls librsync or at least wraps the calls for you. I'm always suspicious of sub-shelling
  • by gizmo on 8/19/23, 10:03 AM

    How does it deal with interrupted backups?

    Can it automatically prune backups older than N days?

    I don’t see anything about encryption.

  • by pmontra on 8/19/23, 6:47 AM

    Why not rsnapshot? I've been using it to backup servers to servers for a lot years.
  • by BigBalli on 8/19/23, 2:59 AM

    how is it better/safer than manually using rsync?
  • by sureglymop on 8/19/23, 6:31 AM

    Have a look at restic for a good alternative to this.