On Sun, Nov 03, 2002 at 07:07:20PM +1100, Kieran Haughey wrote:
> I do remember though that there was a method of using tar to do it
> without creating and files (stdout->stdin) which I might look into.
(please wrap your lines)
You can do that with any self respecting unix backup tool:
Given your old partition mounted at /old/home, and the new
one at /new/home, these should all work:
gnu cp: (probably the easiest on gnu systems)
cd /old/home && cp -a . /new/home
tar:
cd /old/home && tar cf - . | ( cd /new/home && tar xf -)
dump/restore:
cd /old/home && dump 0f - | ( cd /new/home && restore xf - )
gnu cpio:
cd /old/home && find . -print0 | cpio -pdm0 /new/home
Notes: these all have slightly differing behaviours on
different Unixes. Non-gnu cp does not have the -a (archive)
option. For the cpio version, only gnu find/gnu cpio
support the -print0/-0 options without which it will choke on
funny filenames. Tar on non gnu systems may also have dumb
path and directory depth restrictions.
These may copy more than you want if you have filesystems mounted
under /old/home. I used && to link the commands rather than
';' because otherwise if the cd commands fail for any reason BAD things
might happen.
Matt
(ps, in 15+ years of Unix admin, I have never used dd to copy
a disk and never seen a need to.)
--
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug