Live data from Hacker News

Time Machine-style backups with rsync (2018)

samuelhewitt.com

41–50 of 57 posts

Re: Time Machine-style backups with rsync (2018)

#41

"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 used to use Borg, but Restic (and it's Rust clone Rustic) are better.

Why?

I’m currently trying to decide between Borg and Restic myself. Borg has worked very well for me in the past, and I’m a bit excited by the new Vorta GUI frontend. But I already have a BackBlaze B2 setup for backing up my Mac, and Restic would let me continue to use that as a backup store. I’m interested in hearing about differentiating points between them.

Re: Time Machine-style backups with rsync (2018)

#42
post #37

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 af…

I lost all my files to Time Machine in 2008. I don't remember exactly what happened. But since then I'll take a slightly slower, observable command-line copy over sparkly magic.

Yes, I do not trust TM. That's why I have both a backup with TM for convenience and also to have all the files (including system files), and a mirror of the important files (basically my home directory) with `rsync`.

Re: Time Machine-style backups with rsync (2018)

#43
post #37

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 af…

Another thing Time Machine (hopefully) does is append-only backups.

Re: Time Machine-style backups with rsync (2018)

#44
post #41

Earlier quoted context omitted.

I used to use Borg, but Restic (and it's Rust clone Rustic) are better.

Why? I’m currently trying to decide between Borg and Restic myself. Borg has worked very well for me in the past, and I’m a bit excited by the new Vorta GUI frontend. But I already have a BackBlaze B2 setup for backing up my Mac, and Restic would let me continue to use that as a backup store. I’m interested in hearing about differentiating points between them.

Primarily it's the reason you already know: restic and borg are the same model, but restic doesn't need it to be an ssh-accessible filesystem on the remote end. Restic can send backups almost anywhere, including object storage like your Backblaze B2 (that's what I use with restic, too). I agree with OP: restic is strictly better. There's no reason to use borg today; restic is a superset of its functionality.

Re: Time Machine-style backups with rsync (2018)

#45

Earlier quoted context omitted.

In that case you are supposed to use your /other/ backup. Which you have.

Defeating the point of deduplication...

On a single drive, deduplicate all you want. But you need to have two drives, at least, anyway.

Re: Time Machine-style backups with rsync (2018)

#46

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

> "borg" has basically solved backups permanently. It's deduplicated, even across snapshots, compressed, and end-to-end encrypted. 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,…

This is why Proxmox Backup Server has scheduled "verify" tasks which look at the sha256 of every stored hunk to make sure it hasn't rotted on disk. (If it has, it makes sure to re-acquire that data on the next backup - hopefully it's still available!)

Re: Time Machine-style backups with rsync (2018)

#47
post #41

Earlier quoted context omitted.

Why? I’m currently trying to decide between Borg and Restic myself. Borg has worked very well for me in the past, and I’m a bit excited by the new Vorta GUI frontend. But I already have a BackBlaze B2 setup for backing up my Mac, and Restic would let me continue to use that as a backup store. I’m interested in hearing about differentiating points between them.

Primarily it's the reason you already know: restic and borg are the same model, but restic doesn't need it to be an ssh-accessible filesystem on the remote end. Restic can send backups almost anywhere, including object storage like your Backblaze B2 (that's what I use with restic, too). I agree with OP: restic is strictly better. There's no reason to use borg today; restic is a superset of its functionality.

Does restic work well with truenas?

Re: Time Machine-style backups with rsync (2018)

#48

Ha. That's a throwback. 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.

HA! It read your post I read back then and I have been using it ever since. So thank you. I guess I need to check out borg ;)

Small world!

You're welcome.

Yeah, give borg a look. It's just faster to back up, faster to delete old backups, and just easier to do restores because so long as you have the appropriate credentials you can list the archive from any machine.

I think there's still a place/use for --link-dst and hardlinks, but as a backup system I think borg does it better.

For reference: https://nuxx.net/blog/2019/11/10/using-borg-for-backing-up-n...

Re: Time Machine-style backups with rsync (2018)

#49

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?

Yes, it is; among a few other great cross-platform FOSS tools that are built just for backups, and they do it really well. But most of them do periodic scans (as opposed to file change trigger-based backup runs, which I guess is what you might be looking for, I assume by your second sentence).

FSEvents can be used for triggering a backup on change, but in the case of emulating their use in Time Machine, the goal is to use them to list all directories which have been changed since the last backup to avoid unnecessary rescanning.

Re: Time Machine-style backups with rsync (2018)

#50

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

> "borg" has basically solved backups permanently. It's deduplicated, even across snapshots, compressed, and end-to-end encrypted. 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,…

the backups in borg and restic are not classical copies, each snapshot is not independent, it is a collection of hashed blocks. In a sense, time machine and hard links do the same: they reference the same bits across snapshots, saving space. for the bit rot / faulty sector or failed drive, you use redundancy with RAID or similar in your file system. if all else fails and your backup system burns in a fire, then you reach for your other backup. deduplication and redundancy solve different problems.
Post reply on HN