From owner-freebsd-questions@FreeBSD.ORG Sat Oct 17 10:35:38 2009 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 128991065672 for ; Sat, 17 Oct 2009 10:35:38 +0000 (UTC) (envelope-from mdc@prgmr.com) Received: from mail.prgmr.com (mail.prgmr.com [64.62.173.114]) by mx1.freebsd.org (Postfix) with ESMTP id 002118FC12 for ; Sat, 17 Oct 2009 10:35:37 +0000 (UTC) Received: from frylock.local (c-71-202-135-91.hsd1.ca.comcast.net [71.202.135.91]) by mail.prgmr.com (Postfix) with ESMTP id 34DAB68B5B for ; Sat, 17 Oct 2009 03:42:34 -0700 (PDT) Message-ID: <4AD99DF9.5010106@prgmr.com> Date: Sat, 17 Oct 2009 03:35:37 -0700 From: Michael David Crawford Organization: Prgmr.com User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 References: <560f92640910142042tc46f1e3lb81ac1e4528a44ab@mail.gmail.com> <20091015143947.GB54613@gizmo.acns.msu.edu> <560f92640910151742h33393131j9974c23db37602b8@mail.gmail.com> In-Reply-To: <560f92640910151742h33393131j9974c23db37602b8@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: questions@freebsd.org Subject: Re: Best procedure for full backup of live system 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: Sat, 17 Oct 2009 10:35:38 -0000 Nerius Landys wrote: > > dd if=/dev/ad4 of=MBR_backup bs=512 count=1 > > to back up the MBR, so I can recontruct the boot program and partition > table. But they don't mention that in the Handbook. While that will back up the Master Boot Record, it's not sufficient for the general case of MS-DOS style partitions. It will only include the primary and extended partitions. The logical partitions, which exist inside an extended partition, are a linked list whose elements are distributed across your disk somewhere. If you have any extended partitions, you need to back them up too. They aren't part of the 512-byte MBR so just using dd to grab the first 512 bytes won't do. The Linux sfdisk program can create a machine readible text file that includes any logical partitions. Does FreeBSD also have sfdisk? Perhaps it's in ports. I don't have my FreeBSD box handy right now so I can't just look. ... and as has been pointed out, you'll also want your BSD disklabel which is a whole different beast. Mike -- Michael David Crawford mdc@prgmr.com prgmr.com - We Don't Assume You Are Stupid. Xen-Powered Virtual Private Servers: http://prgmr.com/xen