Date: Fri, 8 Jun 2012 17:58:31 -0600 (MDT) From: Warren Block <wblock@wonkity.com> To: Robert Huff <roberthuff@rcn.com> Cc: freebsd-questions@freebsd.org, "Ronald F. Guilmette" <rfg@tristatelogic.com> Subject: Re: Making a bootable backup (hard)disk... how? Message-ID: <alpine.BSF.2.00.1206081746150.62743@wonkity.com> In-Reply-To: <20434.30642.31558.246729@jerusalem.litteratus.org> References: <2903.1339191855@tristatelogic.com> <20434.30642.31558.246729@jerusalem.litteratus.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1206081746150.62743>