CyberPsychotic wrote:
> > (A copy of this message has also been posted to the following newsgroups:
> > alt.linux,
> > alt.os.linux,comp.os.linux,comp.os.linux.help,comp.os.linux.questions)
> >
> > I would like to duplicate a partition to have an exact copy in case where
> > my main partition crashes. What is the best way to do this in particular
> > to copy the special files.
>
> i would use dd if=/dev/partition1 of=/dev/partition2 .. if they are of
> the same size on the same disk (or disk geometry is equal)
> or
>
> for f in `ls /root/partition1`
> do
> tar -cpvO $f | tar -x -C/root/partition2
> done
>
> in other cases.
The `tar -c ... | tar -x ...' trick is effectively redundant if you
have GNU cp. I think that `cp -a' is actually better than the tar
trick, as it will preserve the relationship between hard links.
--
Glynn Clements <[EMAIL PROTECTED]>