[plug] dd </dev/hda >/dev/hdb

Russell Steicke r.steicke at bom.gov.au
Sat Dec 2 13:49:45 WST 2000


On Sat, Dec 02, 2000 at 12:19:03PM +0800, Peter F Bradshaw wrote:
....
> find /proc > /no_copy
> mount /dev/hdb2 /mnt/hdb
> mount /dev/hdb1 /mnt/hdb/boot
> (cd /; tar -cvpf - --exclude-from /no_copy .) | (cd /mnt/hdb; tar -xpf -)

When doing things like this, I find it safer to do

  (cd / && tar cvfp - ) | ( cd /mnt/hdb && tar xpf -)

ie replace the ';' with '&&', so the tars will only run if the cds are
successful.  This prevents tar doing damage in the event of a typo in one
of the cd commands.

> Cheers
> 
> --
> Peter F Bradshaw          | http://members.dingoblue.net.au/~pfb
> pfb at users.sourceforge.net | PGP public key at
> http://www.pfb.tsx.org    | http://members.dingoblue.net.au/~pfb/public_key.html
> ICQ 75431157 (exadios)    | "Needs more salt" - Archimedes

-- 
Russell Steicke

-- Fortune says:
"If value corrupts then absolute value corrupts absolutely."



More information about the plug mailing list