[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#14383: cp --one-file-system / will not copy whole root filesystem
From: |
Pádraig Brady |
Subject: |
bug#14383: cp --one-file-system / will not copy whole root filesystem |
Date: |
Fri, 10 May 2013 19:02:59 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 |
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.