[buug] disk clone

Rob Helmer robert at namodn.com
Sat Nov 9 12:31:55 PST 2002


On Sat, Nov 09, 2002 at 12:15:38PM -0800, Rob Helmer wrote:
> On Sat, Nov 09, 2002 at 02:01:19AM -0800, Rick Moen wrote:
> > Quoting Rob Helmer (robert at namodn.com):
> > 
> > Given that you say GNU tar handles special devices, that's pleasant
> > news, but it seems likely that it does so with or without -f (i.e.
> > without regard to the target).  I never count on that with any tar 
> > implementation, personally.
> 
> 
> Without -f you'll just get the output to STDOUT, which is certainly
> not what you want in this case.

Actually, I take this back. Sometimes you certainly to want to
stream it somewhere. The "-f" option is just irrelavent to 
this situation, and wouldn't be here if I hadn't typo'd.

I've moved a system from one hard drive to the other using GNU
tar by having the "clone" mounted on /mnt and doing something like :

--
cd /mnt
tar -cp "(directories)" | tar -x
--

Where "(directories)" is replaced "/bin /boot /etc /dev" and so on, 
it's important to avoid "/mnt" or wherever your current working 
directory is ( this results in an infinite loop otherwise ).

This is somewhat lazy in that most other versions of tar would
require something like "tar -cpf - '(dirs)' | tar -xf -", you
have to specify stdin/out explicitly as "-".

That works in GNU tar but it isn't required.



--
Rob



More information about the buug mailing list