This would of course also be possible on Linux (using *notify), and there are some projects who 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 did the same thing, but with a more detailed writeup, in 2009: https://nuxx.net/blog/2009/12/06/time-machine-for-freebsd/
It was really handy, but I now use borg as it just works better.
[0] Not strictly the right name but I've forgotten. Y!uk people of that era know what I mean.
Deduplication helps minimize space, but isn't it a major liability in backups? I mean, what happens when you try to restore your backups but a lone sector holding a file from way back in the past happens to not be recoverable? Doesn't it mean that no matter how frequent your backups are, your data is lost?
Do modern disks even have physical "sectors" anymore? Isn't it all virtual?
Without dedup you're just going to backup less stuff, which is far worse.
What? You actually think that the mere idea of a backup getting corrupted is something that is "bordering on paranoia"? Have you ever heard of redundancy or even RAID?
> If the bad sector contains a critical part of the filesystem, you're going to lose everything anyway.
Do you honestly failed to understand that the problem is actually the "lose everything" part?
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.
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.
An important feature of backups is the ability to restore them. As much as I love restic, I have at least one backup target with hard links.
[0] https://support.bombich.com/hc/en-us/articles/20686443871383...
I know some folks that have been using that for a very long time as well.
Anyone have a good script for macOS triggered by launchd, ideally something that uses FSEvents to check for directory changes?
TM integration is just so convenient...
And then once all references to the inode are removed (by rotating out backups) it's freed. So there's no maintenance of the deduping needed, it's all just part of how the filesystem and --link-dest work together.