From owner-freebsd-questions@FreeBSD.ORG Mon Jan 3 19:05:10 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 76EE116A4CF for ; Mon, 3 Jan 2005 19:05:10 +0000 (GMT) Received: from smtp1.server.rpi.edu (smtp1.server.rpi.edu [128.113.2.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id E667943D4C for ; Mon, 3 Jan 2005 19:05:09 +0000 (GMT) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp1.server.rpi.edu (8.13.0/8.13.0) with ESMTP id j03J582m001871; Mon, 3 Jan 2005 14:05:08 -0500 Mime-Version: 1.0 Message-Id: In-Reply-To: References: Date: Mon, 3 Jan 2005 14:05:07 -0500 To: Eric F Crist , FreeBSD-Questions Questions From: Garance A Drosihn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-CanIt-Warning: NOT SCANNED BY CANIT: DATABASE IS DOWN X-Scanned-By: CanIt (www . canit . ca) Subject: Re: Backup with dd? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jan 2005 19:05:10 -0000 At 11:57 AM -0600 1/3/05, Eric F Crist wrote: >Hello all, > >I've decided to try doing a complete system backup, attempting a >bit-for-bit copy. A friend told me to try the following: > ># dd if=/dev/ad4 of=/dev/ad6 > >Both drives are identical SATA150. Is this the best way? While that will probably work, it is also somewhat risky to make a direct copy of a disk that you are actively using. You can end up with a copy that has inconsistencies, because of changes that happen on the source disk during the time it takes to do a copy. And if you are copying a huge disk, it *will* take a significant amount of time to perform that copy. By "inconsistent", I mean that when you boot up on the copy, the initial 'fsck' will fail because of inconsistencies on the disk. I have done 'dd' copies like this. I have seen fsck failures... >I'm hope to be able to do a daily/weekly backup this way, and if >my primary drive fails, switch the cables and just reboot. You would be better to do the copies on a per-partition basis, and first create a UFS snapshot of each partition, and then use the snapshot as the source for your copy. I actually use a 'dump -L' command, combined with 'restore'. The -L option causes dump to automatically create the snapshot for the partition you specified. It uses the snapshot for the copy, and then destroys the snapshot when the copy has finished. This assumes you're running 5.3-stable or 6.x-current. I am not sure how well snapshots would work on 4.x-stable. -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu