Take the 2-minute tour ×
Server Fault is a question and answer site for professional 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:

backup/cpbackup/daily/username/homedir/mail/cur/1244452567.H511146P7355.dwhs45.dwhs.net,S=2161:2,

backup/cpbackup/daily/username/homedir/mail/cur/1244455430.H516330P14494.dwhs45.dwhs.net,S=4062:2,

I tried this:

backup/cpbackup/daily/*/homedir/mail/cur/*

and this:

*.*.dwhs45.dwhs.*

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:

mail/cur/

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

share|improve this answer

Your Answer

 
discard

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