Copy EVERYTHING

Tim Waugh twaugh at redhat.com
Tue Dec 5 09:38:38 UTC 2006


On Tue, 2006-12-05 at 10:18 +0800, Hadders wrote:
>  > cd /oldpart;  find . -xdev | cpio -padm /newpart
> 
> Is it really as easy as that to copy everything?

Are you using SELinux at all?  If so then I don't think that command
will copy the SELinux file contexts.  You might have luck with this
command:

  cp -xdR --preserve=all /oldpart/. /newpart/

but make sure SELinux is in permissive mode first (in case it actually
stops you tries to read an oldpart file).  Note that the above command
doesn't copy over the SELinux file context of '/' for some reason so
you'll have to do that manually as well with chcon.

Tim.
*/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20061205/46f23700/attachment-0001.sig>


More information about the fedora-list mailing list