20 comments

[ 2.7 ms ] story [ 42.5 ms ] thread
Isn’t restic better for backups overall?

Anyone have a good script for macOS triggered by launchd, ideally something that uses FSEvents to check for directory changes?

If we spoke about a Linux box, one that prudently ran ZFS, or XFS on top of LVM, it would be possible to make a snapshot before the diffing and sending, so that the snapshot would be indeed point-in-time. IDK if whatever macOS uses for the filesystem supports snapshots.

Otherwise, I think, restic or kopia are better for proper backups, and Syncthing for keeping a mirror copy. But the simplicity of this script in charming.

The original post that introduced this idea into general public: http://www.mikerubel.org/computers/rsync_snapshots/

I’m sure others will chime in that they used hard links like this before then, however as noted in that page, it’s the one that made it popular enough that rsync was updated to support the idea natively.

Why make hard links when you can use rsync or syncthing to just make an actual copy on an external hard drive eg via wifi or just remotely?
Need to combine this with LVM or BTRFS or similar to be a true snapshot. Rsnapshot supports LVM snapshot pretty good.
"borg" has basically solved backups permanently. It's deduplicated, even across snapshots, compressed, and end-to-end encrypted. I'm surprised it's not more well known.
I use bontmia since forever, based on the same rsync feature (link-dest for creating hard links to the unmodified files since the last backup). It also supports backup rotation and I think it's quite solid/reliable after all these years: https://github.com/hcartiaux/bontmia
restic to s3 has been very reliable - haven't tried borg.
One big drawback of these solutions is that they cannot archive the system apps properly. Nor can they be used during the OS setup.

TM integration is just so convenient...

Used this technique (albeit counter-based, not time-based) successfully for backing up the 2006 World Cup site newsfeed[0] configurations/data. Had 6 rotating backups on two hosts. Never had to use them (as best I remember) but it was definitely comforting to know they were there in case of urgent rollback.

[0] Not strictly the right name but I've forgotten. Y!uk people of that era know what I mean.

This is just half of what Time Machine does. What people are constantly missing is that Apple Time Machine is fast, as it does not need to walk through the whole filesystem to find changed files. Thanks to FSEvents, introduced in Mac OS X Leopard, it knows which directories actually contain changed files and hence usually only needs to check a small fraction of the filesystem. (Not sure if it still works that way after the switch to APFS).

This would of course also be possible on Linux (using *notify), and there are some projects which try to do this, but it's really hard to do it reliably. You might argue that this feature is less important nowadays because NVME SSDs are so fast, but still, I remember very well how astonished I was that creating a new time machine snapshot on OS X Leopard took mere seconds.

I remember doing my own backups with rsync a super long time ago! It worked pretty well, but it didn't have compression, encryption, desktop integration, or deduplication, and adding anything would be one more script to maintain.

Now I use Kopia, no real complaints there. I used to use Borg but until recently it needed some fussy extra community package to work on Synology.

What happened to tarsnap? Anybody using it?
It's still there; and yes, people are using it.