Making a bootable backup (hard)disk... how?
wblock at wonkity.com
Fri Jun 8 23:58:33 UTC 2012
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
> 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 might be something
for a bootable backup in ports, or it could be done with a script using
gpart. Set up the disk with GPT labels to make it relocatable, use dump
to copy everything the first time, fix up a few things like fstab and
ifconfig_DEFAULT in the same script.
Afterwards, rsync may be enough for fast updates.
More information about the freebsd-questions