Re: ssh and dd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 07/25/2010 03:26 PM, Ross Walker wrote:
>
> Better then dd over ssh,

Well, no...  If you're trying to do an *image*, you'll find that cpio 
can't write an image out to a block device.

It's fairly easy to make dd as bandwidth efficient as clonezilla.

1: Clear all of the unused blocks on the local filesystem which you want 
to image:
# dd if=/dev/zero of=/mnt/zero
# rm /mnt/zero

2: Copy your filesystem to a file:
# umount /mnt
# dd if=/dev/sdb1 of=/var/tmp/fs.img

3: Compress your filesystem image:
# bzip2 /var/tmp/fs.img

4: Copy the image to the remote system:
# ssh root@remote 'bzip2 -dc | dd of=/dev/sda1' < /var/tmp/fs.img.bz2

Can't get much better than that for low-volume copies.  If you need to 
repeat the process on a lot of machines, clonezilla gives you some nice 
options.  If you're copying files instead of images, cpio might be useful.
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux