Server Fault is a question and answer site for system and network administrators. 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

I have an ignore file for rsync but I can't figure out how to ignore this string of file names and the username:



I tried this:


and this:


But of course that would be too easy.

Basically I just want to not transfer all the mail in the /cur/ directory for all users to the backups.

share|improve this question

man rsync has a whole section on INCLUDE/EXCLUDE PATTERNS. In short, for the first case, you might first want to unanchor the match and make sure it's a directory, like so:


No wildcards here, it will only ignore a directory called cur inside another directory called mail.

share|improve this answer

Your Answer


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