From owner-freebsd-questions@FreeBSD.ORG Mon Dec 8 16:50:35 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6EF491065675; Mon, 8 Dec 2008 16:50:35 +0000 (UTC) (envelope-from djp@polands.org) Received: from hrndva-omtalb.mail.rr.com (hrndva-omtalb.mail.rr.com [71.74.56.124]) by mx1.freebsd.org (Postfix) with ESMTP id 12C398FC1C; Mon, 8 Dec 2008 16:50:34 +0000 (UTC) (envelope-from djp@polands.org) Received: from haran.polands.org ([75.87.219.217]) by hrndva-omta03.mail.rr.com with ESMTP id <20081208165034.HGQG8173.hrndva-omta03.mail.rr.com@haran.polands.org>; Mon, 8 Dec 2008 16:50:34 +0000 Received: from ammon.polands.org (ammon.polands.org [172.16.1.7]) by haran.polands.org (8.14.2/8.14.2) with ESMTP id mB8GoXkS002632; Mon, 8 Dec 2008 10:50:33 -0600 (CST) (envelope-from djp@polands.org) Received: from ammon.polands.org (localhost [127.0.0.1]) by ammon.polands.org (8.14.2/8.14.2) with ESMTP id mB8GoXOE097590; Mon, 8 Dec 2008 10:50:33 -0600 (CST) (envelope-from djp@ammon.polands.org) Received: (from djp@localhost) by ammon.polands.org (8.14.2/8.14.2/Submit) id mB8GoXwS097589; Mon, 8 Dec 2008 10:50:33 -0600 (CST) (envelope-from djp) Date: Mon, 8 Dec 2008 10:50:32 -0600 From: Doug Poland To: Ivan Voras Message-ID: <20081208165032.GA99675@polands.org> References: <493AFD81.6020705@polands.org> <20081208153348.GA57784@polands.org> <9bbcef730812080822q495da820h1fdd28c9ab2c96d7@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9bbcef730812080822q495da820h1fdd28c9ab2c96d7@mail.gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-questions@freebsd.org Subject: Re: Backup complete gmirror/gstripe/gjournal drives, how-to? 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: Mon, 08 Dec 2008 16:50:35 -0000 On Mon, Dec 08, 2008 at 05:22:05PM +0100, Ivan Voras wrote: > 2008/12/8 Doug Poland : > > On Mon, Dec 08, 2008 at 10:29:36AM +0100, Ivan Voras wrote: > > >> I hope you understand the problems with this kind of backup > >> procedures. > >> > > Actually, I don't, that's why I'm posting :) My intent is to have a > > Here are a couple of things: > I'd like to reiterate a statement I made in my OP, this is a "one-time" backup to preserve GEOM metadata. After this, I will use dump and rsync as I ordinarily do. > a) How do you intend to restore the images? > Booting from a live CD and reversing the dd netcat commands. Something like: livecd# nc -l 1234 | dd of=/dev/ad4 backup# gzip -dc /data/backup/ad4.img | nc livecd 1234 > You need drives with >= size of the original drives (and images). If > you have larger drives, the extra space might be wasted. > Understood > b) With this method you cannot use (or actually, you can but it's very > hard) any kind of differential/incremental backup, and in addition to > the used space you're also backuping the unused/"empty" space. > My intent would be to use the dd images to restore the disk partitions and GEOM metadata, then I would use restore to get the latest data. > c) dd as you've used it will skip bad sectors, in a bad way - it will > either stop (according to the documentation) or concatenate data > blocks around the ones containing the bad sector (e.g. if a sector in > the tenth block of 2 MB is bad, your file will contain blocks > ...8,9,11,12,...). See conv=noerror,sync options to dd. > Thank you for bringing that out. I have seen references to those dd options while googling this topic. Will using conv=noerror,sync preserve the disk in a viable state? Fundamentally, is there a better way to accomplish what I'm trying to do? Basically a bare-metal backup/restore of a 4-disk RAID-10 built using gmirror/gstripe with gjournal on top. If my dd solution is too problematic, I'll do something else. Your comments and suggestions are very welcome... -- Regards, Doug