gabriel rosenkoetter on Thu, 11 Jan 2001 06:47:29 -0500


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

Re: [PLUG] this time "copying partitions"


On Thu, Jan 11, 2001 at 12:31:31PM +0100, MaD dUCK wrote:
> but this is linux and so it should be rather trivial to mount the
> respective partitions in two trees such as /hdb and /hdc, then to do
> a cp -a /hdb /hdc and then to rerun lilo on the new harddrive. that's
> bound to work, isn't it?

Ack, no, no. Don't trust cp's -a flag.

Use tar cpf - -C fromdir | tar xpf - -C todir

(Or cd todir ; tar cpf - . | ( cd todir && tar xpf -) if you don't
trust Gnu's new-fangled -C flag.)

Or pax... er, does that ship with Linux? Hrm, guess not, but still:

pax -r -w -p e fromdir todir

(I like pax because it handles all of cpio, bcpio, sv4cpio, sv4crc,
tar, and ustar...)

       ~ g r @ eclipsed.net


______________________________________________________________________
Philadelphia Linux Users Group       -      http://www.phillylinux.org
Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce
General Discussion  -  http://lists.phillylinux.org/mail/listinfo/plug