Re: Disk Cloning
krad writes: On a side note. Anyone building new systems manually from the shell I would recommend using GPT labels if you can. Apart from not having the 8 fs limit (128 iirc) gpart is a dam sight nicer to use than bsdlabel, and scripting it Any links on GPT on 8? Found this tutorial for 7 http://www.daemonforums.org/showthread.php?t=2666 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Disk Cloning
On Tue, 29 Sep 2009 18:15:00 -0600 (MDT), Warren Block wrote: > For me, it would be because dealing with an individual 512-byte > partition table file is easier than decompressing a multi-gigabyte image > file to get at the first 512 bytes. There is a point where a dd copy of the MBR is quite useful, this is when some MICROS~1 system messed up the MBR and you just want to restore it as it was - when it was completely fine. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Disk Cloning
On Tue, 29 Sep 2009, RW wrote: On Mon, 28 Sep 2009 20:08:43 -0600 (MDT) Warren Block wrote: On Tue, 29 Sep 2009, RW wrote: On Tue, 29 Sep 2009 02:22:31 +0200 Polytropon wrote: doing 1:1 copies with dd is always possible and will keep content identically; remember to copy the MBR separately with bs=512 and count=1 from the /dev/ad{source} device. Why? Because it contains the partition table. Right, but why separately, rather than with the rest of the disk? For me, it would be because dealing with an individual 512-byte partition table file is easier than decompressing a multi-gigabyte image file to get at the first 512 bytes. -Warren Block * Rapid City, South Dakota USA ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Disk Cloning
On Tue, 29 Sep 2009 02:32:33 +0100, RW wrote: > On Tue, 29 Sep 2009 02:22:31 +0200 > Polytropon wrote: > > > doing 1:1 copies with dd is always possible and will > > keep content identically; remember to copy the MBR separately > > with bs=512 and count=1 from the /dev/ad{source} device. > > Why? As far as I understood, the MBR is 512 bytes at the beginning of the disk. If you dd the disk with a bs != 512, it won't be transferred correctly, because in relation to the disk size you usually do something like bs=1m. So the commands would be: # dd if=/dev/ad0 of=/mnt/ad0.mbr.dd bs=512 count=1 # dd if=/dev/ad0 of=/mnt/ad0.dd bs=1m But I have to admit that I never tried it in reality. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Disk Cloning
On Mon, 28 Sep 2009 20:08:43 -0600 (MDT) Warren Block wrote: > On Tue, 29 Sep 2009, RW wrote: > > > On Tue, 29 Sep 2009 02:22:31 +0200 > > Polytropon wrote: > > > >> doing 1:1 copies with dd is always possible and will > >> keep content identically; remember to copy the MBR separately > >> with bs=512 and count=1 from the /dev/ad{source} device. > > > > Why? > > Because it contains the partition table. Right, but why separately, rather than with the rest of the disk? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Disk Cloning
On Tue, 29 Sep 2009, RW wrote: On Tue, 29 Sep 2009 02:22:31 +0200 Polytropon wrote: doing 1:1 copies with dd is always possible and will keep content identically; remember to copy the MBR separately with bs=512 and count=1 from the /dev/ad{source} device. Why? Because it contains the partition table. -Warren Block * Rapid City, South Dakota USA ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Disk Cloning
On Tue, 29 Sep 2009 02:22:31 +0200 Polytropon wrote: > doing 1:1 copies with dd is always possible and will > keep content identically; remember to copy the MBR separately > with bs=512 and count=1 from the /dev/ad{source} device. Why? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Disk Cloning
2009/9/29 Polytropon > On Tue, 29 Sep 2009 01:07:31 +0100, krad wrote: > > If your going to do all the partitoning manually its not to much more > work > > to newfs them as well. > > Partitioning can be automated, as well as newfs, which does > take only seconds on a TB-sized disk. If you want to avoid > this, doing 1:1 copies with dd is always possible and will > keep content identically; remember to copy the MBR separately > with bs=512 and count=1 from the /dev/ad{source} device. > > If cloning is just a "do once" action, even partitioning > the target disk manually is a matter of seconds. If you're > going to to it many times, scripting should give a good > solution to automate it. > > > > > You can then use rsync which is fast. > > If partitions do already exist, rsync is an excellent tool, > too, I agree. Another tool that comes into mind is cpdup > which works fine with locally available and NFS mounted > drives. > > > > -- > Polytropon > Magdeburg, Germany > Happy FreeBSD user since 4.0 > Andra moi ennepe, Mousa, ... > On a side note. Anyone building new systems manually from the shell I would recommend using GPT labels if you can. Apart from not having the 8 fs limit (128 iirc) gpart is a dam sight nicer to use than bsdlabel, and scripting it is a doddle. Especially the gpart from 8.0 as its a bit less clunky than the one in 7.x at the moment ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Disk Cloning
On Tue, 29 Sep 2009 01:07:31 +0100, krad wrote: > If your going to do all the partitoning manually its not to much more work > to newfs them as well. Partitioning can be automated, as well as newfs, which does take only seconds on a TB-sized disk. If you want to avoid this, doing 1:1 copies with dd is always possible and will keep content identically; remember to copy the MBR separately with bs=512 and count=1 from the /dev/ad{source} device. If cloning is just a "do once" action, even partitioning the target disk manually is a matter of seconds. If you're going to to it many times, scripting should give a good solution to automate it. > You can then use rsync which is fast. If partitions do already exist, rsync is an excellent tool, too, I agree. Another tool that comes into mind is cpdup which works fine with locally available and NFS mounted drives. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Disk Cloning
2009/9/28 Polytropon > On Mon, 28 Sep 2009 01:14:44 -0500, Chris wrote: > > Please suggest a cloning method comparable to Clonezilla. > > For FreeBSD, I'd tend to use dump + restore, because that's > their main purpose. > > > > > 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). > > You haven't tried restoring? You should, it's worth it, because > what's the value of a backup that cannot be restored? :-) > > > > > 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. > > Well, dump + restore isn't known for ultimate performance, but > its results are good; dd, on the other hand, is another possible > way to go. The advantage of dd is that it can be used with any > filesystem. > > > -- > Polytropon > Magdeburg, Germany > Happy FreeBSD user since 4.0 > Andra moi ennepe, Mousa, ... > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to " > freebsd-questions-unsubscr...@freebsd.org" > If your going to do all the partitoning manually its not to much more work to newfs them as well. You can then use rsync which is fast. Make sure you use good flags though, the following should do the job rsync -aPH --numeric-ids ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Disk Cloning
On Mon, 28 Sep 2009 01:14:44 -0500, Chris wrote: > Please suggest a cloning method comparable to Clonezilla. For FreeBSD, I'd tend to use dump + restore, because that's their main purpose. > 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). You haven't tried restoring? You should, it's worth it, because what's the value of a backup that cannot be restored? :-) > 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. Well, dump + restore isn't known for ultimate performance, but its results are good; dd, on the other hand, is another possible way to go. The advantage of dd is that it can be used with any filesystem. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Re: Disk Cloning
On 28 Sep 2009 15:02, Giorgos Keramidas wrote: On Mon, 28 Sep 2009 01:14:44 -0500, Chris rac...@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 opera...@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 opera...@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 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Disk Cloning
On Mon, 28 Sep 2009 01:14:44 -0500, Chris 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, e.g. 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 opera...@host1 'dump -0a -C32 -L -f - /' | restore -rf - Clonezilla is really nice, because it can take care of partition layout and sizes automatically. It isn't really _necessary_ to use Clonezilla to clone an existing system though. The base system of FreeBSD includes enough tools to do that already. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: Disk Cloning
On Mon, 28 Sep 2009, Chris wrote: 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 uses ntfsclone or partimage, both programs that have built-in knowledge of specific filesystems. ntfsclone, the default, of course only supports NTFS. partimage has had "beta" support for UFS for a while. I don't know how well it works. You'd have to specifically choose partimage instead of ntfsclone in the Clonezilla startup. To get the equivalent of Clonezilla with FreeBSD, you should be able to boot a "livefs" FreeBSD CD and use dump to backup via ssh. There's an example in the Handbook: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/backup-basics.html#AEN25814 dump is not terribly fast. A comparison to partimage would be interesting. -Warren Block * Rapid City, South Dakota USA ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"