Laptop Backups

Considering btrfs, lvm, rsync, ...

Abstract: jwz is right. Do it the jwz way. However, it is harder to do this if you are using btrfs or lvm. Probably just don’t use them.

Firstly, I am talking about backing up your laptop, which probably has one disk in it. You want to keep going when that disk fails.

The jwz way is to use rsync to another disk of the same physical size, in an external USB case. Then you can swap it in. You might want other backup systems that keep previous versions, or do it over the internet to somewhere else, but this is I think the most important thing to start with, especially if you don’t have a good internet connection, or any at all, as may be when sailing or travelling.

In the past I found the jwz way simple and easy, but it got more complicated when I tried to do it with btrfs and now lvm.

The problem is that btrfs and lvm make it impossible to do a simple rsync. btrfs has its subvolumes and snapshots to consider. It seems like its features like send / receive or RAID might be used, but it is certainly more complicated. I asked on stackoverflow about this and never got a satisfactory answer.

lvm has the problem of volume group names being the same. It is critical that you do not duplicate the volume name and group, as would happen with dd / rsync, because then lvm will think your main and backup drive are the same device, and corrupt them. I installed debian with the defaults, that used lvm, so my solution was to setup lvm on the backup disk manual with a different group name. If I did it again, I would just not use lvm.

My main interest in btrfs was checksumming and scrubbing, and also using snapshots to get versioned backups. Ultimately though I don’t think it’s worth it. btrfs is a hassle to administer and not that great. If I wanted to use an advanced filesystem again I would use zfs, but for now I’ll stick to ext4 and try to relax about the occasional photo corrupting cosmic ray.

A picture of River MacLeod.

River is a humanoid based on the planet Earth. It likes computering, adventures through time and space, and being a cat.