GNU bug report logs - #14383
cp --one-file-system / will not copy whole root filesystem

Previous Next

Package: coreutils;

Reported by: Pavel Machek <pavel <at> ucw.cz>

Date: Fri, 10 May 2013 16:05:02 UTC

Severity: wishlist

Full log


View this message in rfc822 format

From: Pádraig Brady <P <at> draigBrady.com>
To: Pavel Machek <pavel <at> ucw.cz>
Cc: 14383 <at> debbugs.gnu.org
Subject: bug#14383: cp --one-file-system / will not copy whole root filesystem
Date: Fri, 10 May 2013 19:02:59 +0100
On 05/10/2013 11:55 AM, Pavel Machek wrote:
> Hi!
> 
> On systems like linux, cp / -a --one-file-system (destination) will
> not copy whole root filesystem. It is not cp's fault, but the
> behaviour is quite surprising to the users, so maybe it would be worth
> warning in man page?
> 
> Something like
> 
>        -x, --one-file-system
>               stay on this file system
> 
> 	      Note that on systems that allow mounts over non-empty
> 	      directories (like Linux), cp / -ax (destination) will
> 	      not copy whole filesystem. In particular, content of
> 	      /dev will not be usually copied, because distributions
> 	      mount tmpfs over /dev.
> 
> [Ok, there's hopefully better wording...?]

Well this issue is not restricted to -x of course,
but I suppose it's might be a good place to put a warning.
I suppose you could give the advice to ensure that all
mounts in a tree should be unmounted to ensure that
the base file system contents are copied.
That info would be more appropriate in the texinfo manual,
than the man page I would think.

thanks,
Pádraig.





This bug report was last modified 12 years and 42 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.