Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Sep 2009 19:06:02 +0000
From:      utisoft@googlemail.com
To:        "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Subject:   Re: Re: Disk Cloning
Message-ID:  <0016367fa6ee24a7740474a7fd35@google.com>
In-Reply-To: <87zl8ftbfg.fsf@kobe.laptop>

next in thread | previous in thread | raw e-mail | index | archive | help
On 28 Sep 2009 15:02, Giorgos Keramidas <keramida@ceid.upatras.gr> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0016367fa6ee24a7740474a7fd35>