[CentOS] Hardisk cloning for centos-5.3
John R Pierce
pierce at hogranch.com
Mon Feb 15 18:00:53 UTC 2010
premrajm at digilink.in wrote:
> I want to clone my hardisk containing the centos-5.3 OS and its swap
> region on to new raw hardisk via network
> either through ssh, tftp or ftp. How do i do that ?
> Is there any Tool for that or will DD command be sufficient.I know
> that dd command will have to be used on hardisk
> with already existing partitions and not on raw disk.
I'd use something like...
dump -0vf - /dev/sda2 | ssh user at host "cd / && restore rvf - .."
to clone each e2fs/e3fs partition, you should do it from single user
mode with the network manually started and as many partitions umounted
as you can other than / of course. the target is installed as a 2nd
disk on the other system? you'll need each partition created and mkfs
and mounted on the target for restore to work correctly. See the man
pages on dump, restore, as I coughed that up from memory.
this has the advantage of properly handling different partition sizes
More information about the CentOS