Web lists-archives.com

Re: Creating a bootable (non-UEFI) backup copy of a bootable (non-UEFI) Debian hard disk

On 11/3/18 1:45 AM, local10 wrote:

Hi.  :-)

Am looking for an (easy) way to create a backup copy of working bootable Debian Buster HD. The idea here is to have a second bootable fully-functional HD which is normally offline but updated from time to time, including all user data and installed packages.

So for that purpose I have two HDs (working and backup), both are the same model, the same size, both are partitioned exactly the same way (three partitions: /boot, /, swap). Rsync-ing "/" partitions is not a problem and coping boot partition files from "working /boot" to "backup /boot" could be easily done too. However, I'm having issues making the backup HD bootable. Either I'm doing something wrong with grub-install and/or perhaps just coping files from "working /boot" to "backup /boot" isn't a good idea?

dd(1) is a lowest-common-denominator tool that is available on most every Debian system, live CD, and installer (plus other Linuxes and BSD's). I use dd to blindly copy bytes to bytes, so it is unaware of partition tables, slices, partitions, volume managers, encryption, file systems, OS's, drivers, apps, data, etc... It's fast and I avoid the headaches. It should work well for your use-case.