I’m using Ubuntu 21.10 ext4. And I’m using restic to make daily backup snapshots of my ext4 system drive user files to a USB connected external drive. It’s been working great.
I’m thinking of switching to 21.10 btrfs. Does restic work just the same on a btrfs drive?
Would the external drive need to be formatted as btrfs?
No, you can use whatever you want.
One potential advantage of using a btrfs source is that you can use a btrfs snapshot to backup a consistent state of the system. This usually doesn’t play a role when backing up a client computer though, which I believe you’re probably doing.
@nicnab Great. Thanks. Very helpful. I use Clonezilla to make clones of my Ubuntu ext4 system drive to an external drive. It’s easy and works great.
Is there a simple tool like Clonezilla to make a bootable clone of a btrfs system drive?
I looked at a Partclone video and it was too complicated for me.
I’m not so sure to be honest - btrfs is still on my play list Also, if I switch computers, I always take the opportunity to clean up, do a fresh install and get all files and settings I want from my restic backup. That doesn’t take more than an hour usually.
To clone devices, I always just use
dd. If you clone the whole thing and not just one partition (so e.g.
/dev/sda and not
/dev/sda1) I would expect the clone to be just as bootable as the original. My command usually looks like this:
dd if=/dev/sda of=sda.img bs=1M oflag=direct status=progress with an image file in between and then vice versa or directly from device to device with
of=/dev/sdb or whatever the device is called.
What does this mean? I’m a newbie and this will help me understand how to use dd.
dd does is transfer the contents of a device bit by bit (or rather block by block) from
of. You can either plug in the source disk, transfer it to an image file (e.g.
sda.img), then plug in the target device and transfer the contents of the image to it. Or you plug in both source and target at the same time and transfer directly from source to target.
OK, thanks, that helps. For me I’ll only be imaging my internal system drive to an external USB drive. (unless I have to do a restore).
So does dd only work with files? Like restic?
Or does dd copy everything? Like Clonezilla? Can dd create a restorable and bootable full system backup on an external drive? (like Clonezilla)
As I said up there,
dd transfers blocks. Blocksize is specified by the
bs parameter. If you want to learn more, check out the
apropos commands, for instance
man dd. All this really doesn’t have anything to do with restic though!
@nicnab Thanks for the info. I’ll hop on to some other forums to get more info about dd. Cheers.