Re: Duplicating a file system

Eric S. Mountain (eric@minouche.demon.co.uk)
Sat, 9 Mar 1996 20:29:16 +0000 (GMT)


Hi,

Joel Young ecrivit:
> say other partition is on mount,
>
> cp -a / /mnt

This will copy /mnt to /mnt/mnt. The problem is, that as /mnt gets
filled by the cp, when cp starts copying /mnt to /mnt/mnt you will get
the files that are in /mnt (i.e. those copied from / to /mnt so far)
copied to /mnt/mnt. Ouch. If you get my drift...

It seems to me it is a bad idea to cp/tar recursively from / b.c. of
this. You could however specify the the directories to cp, so

cp /bin /mnt

(which you mentionned in your mail) is OK.

I've seen tar recommended for this kind of job
e.g. tar cvBpf - /usr | (cd /mnt ; tar xvBpf - )

- but the above restriction also applies here (also, Bp options might not be
the right ones here - RTFM - this is from distant memory).

Bye, :E

-- 
Eric S. Mountain  -  eric@minouche.demon.co.uk

I'm not lost, but I don't know where I am.

-- 
Eric S. Mountain  -  eric@minouche.demon.co.uk

I'm not lost, but I don't know where I am.