From owner-freebsd-questions@FreeBSD.ORG Mon Sep 28 19:06:04 2009 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 70C6E1065694 for ; Mon, 28 Sep 2009 19:06:04 +0000 (UTC) (envelope-from utisoft@googlemail.com) Received: from mail-yw0-f229.google.com (mail-yw0-f229.google.com [209.85.211.229]) by mx1.freebsd.org (Postfix) with ESMTP id 35A6B8FC20 for ; Mon, 28 Sep 2009 19:06:03 +0000 (UTC) Received: by ywh18 with SMTP id 18so2465005ywh.3 for ; Mon, 28 Sep 2009 12:06:03 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <87zl8ftbfg.fsf@kobe.laptop> Received: by 10.216.38.139 with SMTP id a11mr30149web.20.1254164762238; Mon, 28 Sep 2009 12:06:02 -0700 (PDT) Message-ID: <0016367fa6ee24a7740474a7fd35@google.com> Date: Mon, 28 Sep 2009 19:06:02 +0000 From: utisoft@googlemail.com To: "freebsd-questions@freebsd.org" Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: Re: Disk Cloning 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, 28 Sep 2009 19:06:04 -0000 On 28 Sep 2009 15:02, Giorgos Keramidas wrote: > On Mon, 28 Sep 2009 01:14:44 -0500, Chris racerx@makeworld.com> wrote: > > Greetings, > > > > Please suggest a cloning method comparable to Clonezilla. > > > > Preferably fast, no need to install a base OS, easy to clone and > > restore. Of course, the key is fast. > > > > Clonezilla does a nice job with OS's other than *BSD (It uses dd > > (iirc)) and that takes forever (at least when cloning - have not tried > > a restore). > > > > Some specs I'm using to compare: A typical restore/save currently with > > other OS's using CloneZ takes about 12 minutes with a simple boot from > > CD. > > > > The restored/imaged drive is 400 meg sata. > A dump & restore of a 400 MB system should be *very* fast. Copying > files from a read-only USB flash disk easily reaches speeds of more than > 20 MB/sec on my laptop. This means that 400 MB of data should take > around 20 seconds to copy from an external USB disk. > If you can attach both disks at the same time, eg the source disk as > ad0 and the target disk as ad1, it should take less than 2-3 minutes to: > * Enter single user mode > * Partition and mount ad1 under /mnt > * Use dump(8) to save data from ad0 and restore(8) to copy them over > to ad1. > Even if you cannot attach both disks at the same time, but you can > access the source disk over the network, it should be possible to: > * Install the target disk on the target host (host2). > * Boot from a rescue image (CD-ROM, DVD-ROM or USB). > * Bring up a network interface to access the source host (host1). > * Partition the ad0 disk of the target host (host2). The standard > fdisk(8), bsdlabel(8) or gpart(8) utilities can do this. > * Tunnel dump over ssh: > host2# cd / > host2# ssh operator@host1 'dump -0a -C32 -L -f - /' | restore -rf - I might add that if network speed is an issue, it may be worth adding a gzip in there; host2# ssh operator@host1 'dump -0a -C32 -L -f - / | gzip' | gunzip | restore -rf - Just be careful where you put the quotes! Dump is excellent, especially the -L flag for a live filesystem. I can't believe how few OSes don't have snapshot functionality; it's absolutely essential for me. Chris