Bug 8513 - files from local filesystem on source written to different filesystem on dest despite --one-file-system
files from local filesystem on source written to different filesystem on dest...
Product: rsync
Classification: Unclassified
Component: core
All All
: P5 normal
: ---
Assigned To: Wayne Davison
Rsync QA Contact
Depends on:
  Show dependency treegraph
Reported: 2011-10-07 19:03 UTC by Terry Brown
Modified: 2011-10-08 16:38 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Terry Brown 2011-10-07 19:03:01 UTC
doing something like

    rsync -e "ssh -p $PORT" \
        --ignore-errors \
        --only-write-batch=$STORAGE/$TS""_$NAME.rsb \
        --archive \
        --one-file-system \
        --verbose \
        --progress \
        --delete \
        $SOURCE/ \

On the source, due to historical accident, there are *local* files like


and on dest. .../cifs/data1/cdrive is a windows share on another filesystem / machine, but the --read-batch version of the above, even with --one-file-system flag, files on the other filesystem are still overwritten.

Seems --one-file-system should never cross file system boundaries.
Comment 1 Wayne Davison 2011-10-08 16:38:15 UTC
That's not what --one-filesystem limits.  The man page explains it fairly well:

This tells rsync to avoid crossing a filesystem boundary when recursing.  This does not limit the user’s ability to specify items to copy from multiple filesystems, just rsync’s recursion through the hierarchy  of  each directory  that  the  user  specified, and also the analogous recursion on the receiving side during deletion.

So, no limit is place on files that make it into the transfer -- they get transferred.  While it would be possible to add a destination check to see if a particular existing file is on a different filesystem from the starting one, that is not something that I plan to add.