I am preparing a dist-upgrade. Before I do that I want to make a backup of my entire disk so that even if the upgrade fails I can fall back to a backup. I have two SSDs, /dev/nvme0n1 which is the production one and has 500G and /dev/nvme0n2 which will serve as backup, has 1T and is empty.

First I opened gnome-disk-utility and formatted the entire /dev/nvme0n2 to ext4. Then I opened deja-dup GUI, added a single entry / to "Folders to Back Up", selected /dev/nvme0n2 as the destination. I chose a password for encryption than ran the tool. I ran it and went to work. It took much longer than I expected. It had not finished by the time I came back home. The whole process probably took about 10 hours.

When it was finished, I was given a huge list of files that were not backed up. A lot of them were either files that lacked permissions or temporary files that were being modified while the backup ran. Since /boot/efi was one of the folders that were excluded, I probably wouldn't be able to boot from the backup.

I realized that for a complete backup I will probably have to boot from a live usb and run a backup utility from there, so that no files in the source disk are being modified while it is running. Are there command line tools that copy /, or the entirety of a disk to another? I would like to avoid waiting another half-day only to realize that I wasn't doing it properly in the first place. After obtaining a full copy of the original disk, will GRUB automatically fall back to the copy should my primary be rendered unbootable after a botched upgrade? If not, how should I configure it so that I can boot to the secondary drive from the boot menu? /dev/nvme0n1 is LUKS encrypted.

1 Answer 1


As you said: a live USB (e.g. systemrescuecd) is the way to go.

Assuming that when booted from the live USB the device names are still the same I'd do the following (have done in the past).

mount /dev/nvme0n2 /mnt
dd if=/dev/nvme0n1 of=/mnt/original.img bs=4096

As this creates a verbatim copy of the entire disk it is irrelevant whether or not it's encrypted. If your machine has very grunty CPUs you may gain some performance by changing the dd line to:

dd if=/dev/nvme0n1 bs=4096 | gzip > /mnt/original.img.gz 

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .