From owner-freebsd-questions@FreeBSD.ORG Fri Jun 8 23:58:32 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EE0C01065670 for ; Fri, 8 Jun 2012 23:58:32 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id A860E8FC12 for ; Fri, 8 Jun 2012 23:58:32 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.5/8.14.5) with ESMTP id q58NwVaQ063949; Fri, 8 Jun 2012 17:58:31 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.5/8.14.5/Submit) with ESMTP id q58NwV6r063946; Fri, 8 Jun 2012 17:58:31 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Fri, 8 Jun 2012 17:58:31 -0600 (MDT) From: Warren Block To: Robert Huff In-Reply-To: <20434.30642.31558.246729@jerusalem.litteratus.org> Message-ID: References: <2903.1339191855@tristatelogic.com> <20434.30642.31558.246729@jerusalem.litteratus.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (wonkity.com [127.0.0.1]); Fri, 08 Jun 2012 17:58:31 -0600 (MDT) Cc: freebsd-questions@freebsd.org, "Ronald F. Guilmette" Subject: Re: Making a bootable backup (hard)disk... how? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jun 2012 23:58:33 -0000 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.