Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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.