My plan for backups of my home machine (as of early 2024)

February 10, 2024

In theory, what I should do to back up my home desktop is fairly straightforward. I should get one or two USB hard drives of sufficient size, then periodically connect one and do a backup to it (probably using tar, and potentially not compressing the tar archives to make them more recoverable in the face of disk errors). If I'm energetic, I'll have two USB hard drives and periodically rotate one to the office as an offsite backup. Modern USB should be fast enough for this, and hopefully using (fast) USB drives will no longer kill my performance the way it used to. Large HDDs are reasonably affordable, especially if I decide to live with 5400 RPM ones (which I hope run cooler), so I could store multiple full system backups on a single HDD.

In practice this is a lot of things to remember to do on a regular basis, and although I have some of the pieces (and have for years), those pieces have dust on them from disuse. So this approach isn't workable as a way to get routine backups; at best I might manage to do it once every few months. So instead I long ago came up with a plan that is not so much better as more likely to succeed. The short version of the plan is that I will make backups to an additional live HDD in my home desktop.

My home desktop's storage used to be a mirrored pair of SSDs and a mirrored but mismatched pair of HDDs. Back in early 2023, this became all solid state, with a pair of NVMe drives and a pair of SSDs (not the same SSDs, the new pair is much larger). This leaves me with an unused 4 TB HDD, which I actually (still) have in the case. So I can reuse this 4 TB HDD as an always-live backup drive, or what is really 'a second copy' drive. Because the drive will always be there and live, I can automate copies to it, run them from cron, and more or less forget about it (once it's working).

The obvious and most readily automated way to make the backups is to use ZFS snapshots. I'll make a new ZFS pool on the HDD, and then use snapshots with 'zfs send' and 'zfs receive' to move them from the solid state storage to the HDD pool. ZFS's read only snapshots will insure that I can't accidentally damage the backup copies, and I can scrub the HDD's ZFS pool periodically as insurance against disk corruption. My total space usage in both my current solid state ZFS pools is still a bit under 2 TB, so I should have plenty of space for both on a 4 TB HDD.

This is obviously imperfect, since various sorts of problems could cost me both the live storage and the HDD, and I could have ZFS problems too. But it's a lot better than nothing, and sometimes the perfect is the enemy of the good.

(Having written this, perhaps I will actually implement it. The current obstacle is that the old HDDs are still running my old LVM setup, as backup for the ZFS pool I created on the new SSDs and then theoretically moved all of the LVM's contents to. So I'd have to hold my breath and tear down those filesystems and the LVM storage first. Destroying even supposedly completely surplus data makes me twitch just a bit, and so far it's been easier to do nothing.)


Comments on this page:

ZFS's read only snapshots will insure that I can't accidentally damage the backup copies, and I can scrub the HDD's ZFS pool periodically as insurance against disk corruption.

Starting with OpenZFS 2.2, any corruption found could also be fixed:

Corrective "zfs receive" (#9372) - A new type of zfs receive which can be used to heal corrupted data in filesystems, snapshots, and clones when a replica of the data already exists in the form of a backup send stream.

In theory, what I should do to back up my home desktop is fairly straightforward. I should get one or two USB hard drives of sufficient size, then periodically connect one and do a backup to it (probably using tar […]

What I've found to be useful is to have a HDD dock (station) so I can just plug in any old drive and have it mount and then do a backup / clone of my data. I have a reminder in my personal calendar that pops up to remind me to regularly swap drives. It's a bit of a fixed cost, but over time as my backup needs have grown I don't to buy a 'special' USB drive, but any old hard drive with a SATA port (and docks that support M.2/U.2 are also available).

By Blissex at 2024-02-11 16:54:08:

I think that a bit more effort is needed: I am currently "between desktops" but when I had a desktop I had 2TB drives duplicated nightly to 2 TB "alternate" drives (not mirrored, as mirrors can replicate problems too). But I also had a rotation of 2x3 TB external using a SATA dock, done weekly.

https://www.sabi.co.uk/blog/anno05-4th.html?051227b#051227b https://www.sabi.co.uk/blog/0906Jun.html?090607#090607

Currently I have a cheap laptop upgraded with a single 4TB M.2 SSD, and I have for backup 2x external 4TB low-end SSD M.2 in a USB-C small case and 2x 4TB 2.5in USB3 HDDs, and I backup the internal 4TB to the USB-C SSDs twice (or more) a week, to one USB-3 disk every week, to the other disk every month.

The backup via RSYNC (I used to use 'dd' but with Btrfs duplicating volume ids is very risky) to the USB-C SSDs is very fast (huge IOPS on both sides) so I tend to do it fairly reliably.

By Miksa at 2024-02-12 10:13:51:

My solution to this problem was to get a one large harddrive and install it to my work desktop at the university. Every day when I log in to work I run a rsnapshot job that connects to my home server. This might work for you too and it nicely solves the problem of having an offsite backup that avoids the hassle of carrying harddrives and is also online without needing to buy a cloud backup service.

By Arash S.A.H. at 2024-02-13 07:51:28:

I use an external HDD with a systemd-timer which runs a systemd-service which contains a short hand-made “rsync” script. Timer runs once a day... So any time that I plug it in, it starts syncing in background of my system. Using cgroups options of systemd-service I can be sure that it doesn't consume any CPU and I/O more than What I desire. So at the end of the story, the only thing that I need is to remember plugging my HDD once in a while.

By mappu at 2024-02-13 18:33:59:

I advise doing a little more than this. What if there's a physical disaster or a burglary at your home?

The 3:2:1 is you should have three copies - on two different mediums - and one of them should be offsite,

Check out kopia, borg, or restic for something that can do encrypted, deduplicated, incremental-forever backups to cheap cloud storage (Wasabi is 7USD/TB, Backblaze B2 is 6 USD/TB).

Written on 10 February 2024.
« Compatibility lingers long after it's needed (until it gets noticed)
Go 1.22's go/types Alias type shows the challenge of API compatibility »

Page tools: View Source, View Normal, Add Comment.
Search:
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Sat Feb 10 22:00:55 2024
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.