Making a bootable backup (hard)disk... how?

Arthur Chance freebsd at
Sat Jun 9 17:59:30 UTC 2012

On 06/09/12 00:58, Warren Block wrote:
> On Fri, 8 Jun 2012, Robert Huff wrote:
>> Ronald F. Guilmette writes:
>>> I got a lot of disks here, so that part is not a problem. I just
>>> need to make sure that I'm gonna do this the Right Way[tm].
>>> (I've already been making my own ham-fisted disk-to-disk backups
>>> in the past, but I'm sure that the way I have been doing that is
>>> sub-optimal, so I'm here seeking knowledge of how to do this the
>>> Right Way.)
>>> The bottom line is this... I know how to use cpio, and would like
>>> to use it to create a complete and _bootable_ backup of my main
>>> system disk. (My main system disk has only one BIOS partition,
>>> and that is sub-divided into the usual set of FreeBSD partitions,
>>> you know, /, /dev, /tmp, /usr, /var, /usr/compat/linux/proc, and
>>> /var/named/dev.)
>> As far as I know, the only way guaranteed to preserve metadata
>> is dump/restore. See previous (not necessarily recent) discussion
>> (on this list, and possibly in the Handbook) for more information.
> The rsync port has a flags option. I haven't tried it for a full backup.
> Even if it can copy all filesystem attributes like dump, there are still
> non-filesystem things needed for booting that neither can copy, like
> partition tables and boot blocks.

There's a BFI (brute force and ignorance) way of doing it in the base 
system - dd. Provided your system disk is quiescent (ideally when 
running from a live CD or all partitions mounted read-only, otherwise 
pray to the deity of your choice) and the backup disk is a) at least as 
large as the system disk, and b) has the same sector size, then a simple 
dd from the system disk to the backup should work.

[Greybeard war story:] Going back about 25-30 years, a friend of mine 
was responsible for running the Unix systems in an EE department of a UK 
university. He used to back up the disks (probably around 10 MB in those 
days) to 1/2" tape every night. Eventually he got sick of undergraduates 
asking him to restore files they'd accidentally deleted, and hit upon 
the idea of dd'ing the disk to tape, and then if a student wanted a 
restore, he'd mount the tape as a r/o file system (these were the days 
of tape block devices and trusting all users) and tell them to use 
restore to get the files themselves. It took forever, but it was the 
student's time that was wasted, not his. Most of them learned not to 
delete wanted files after one or two times of doing this.

More information about the freebsd-questions mailing list