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

Re: Using dd to clone smaller drive to larger drive



Brian C wrote:
Warning to archive readers. I believe a typo in one of the commands below will destroy your data. Read on...

Alvin Oga wrote:
[snip]

- if you want to leave bad data behind

mount /dev/hdb1 /mnt/new-disk


HERE IT COMES

    tar cvfp old-disk-paritions /mnt/new-disk
just watching the thread for the first time... don't know what was this tar command supposed to do
tar 	
	c	create archive
	v	be verbose
	p	preserve attributes, no effect here, applies only during etraction
f put the archive to file whose name is following the command, in this case old-disk-partitions
		and take the inputs from /mnt/new-disk

wouldn't something like
find source_dirs -xdev | cpio -pvm dest_dir
work better?

in case of tar, probably something like
cd src_dir; tar c * | (cd dest_dir && tar xpv)
might also work fine

regards,

--
Lubos
_@_"



Reply to: