[LUNI] What's the best way to transfer a large amount of data between hard drives?

Jeff Randall randall at uph.com
Fri Oct 6 14:01:13 CDT 2006


On Fri, Oct 06, 2006 at 12:26:00PM -0500, skie at dragonsvalley.com wrote:
> What's the best method of transfering this to
> a new drive?  dd?  rsync?  mv?  I'm thinking that either dd or rsync, but
> I've never really used either very much.  Any input on the pluses/minuses
> of these is appreciated.  Or, if there's another tool you recommend, I'm
> all ears.  Whatever utility is used, it'll have to be command line only.


I use tar to maintain permissions and ownerships and timestamps.
Make the filesystems on the new drive and mount them.

My preferred method:

	cd dir_holding_things_to_move
	tar cfp - things_to_move | ( cd dest_dir ; tar xfvp - )


For your example, if your old files are in /home-old and you want them in
/home then you would do:

	cd /home-old
	tar cfp - bob jane dave erik rachel | ( cd /home ; tar xfvp - )


If you want to move them off machine, you could substitute ssh in the latter
part:

	cd /home-old
	tar cfp - * | ssh root at newbox "cd /home ; tar xfvp - "



-- 
randall at uph.com    "It's a big world and you can hit it with any airplane."
                                           -- Flying, August 2000, Page 90.


More information about the luni mailing list