Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 6 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .