Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Hopefully, this simple question has a simple answer.

I want to run rsync recursively using the -r option, but without descending into a different mount point (file system). i.e. like the -mount option with the find command, one man page reads, e.g., “Don't descend directories on other filesystems. An alternate name for -xdev, for compatibility with some other versions of find.”

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

I believe that you want the -xx option:

-x, --one-file-system
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. Also keep in mind that rsync treats a lqbindrq mount to the same device as being on the same filesystem.

If this option is repeated, rsync omits all mount-point directories from the copy. Otherwise, it includes an empty directory at each mount-point it encounters (using the attributes of the mounted directory because those of the underlying mount-point directory are inaccessible).

The reason I say -xx is due to the bolded section (emphasis added).

share|improve this answer
    
Thanks. I must've passed over that a dozen times on the man page. :-) –  danorton Jul 31 '13 at 14:59
    
No worries, I just used the search function (/) and looked for "mount". Took a few nexts. Glad it works! –  nerdwaller Jul 31 '13 at 15:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.