1

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.

Dennis Williamson
  • 62,149
  • 16
  • 116
  • 151

1 Answers1

0

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.

raphink
  • 11,987
  • 6
  • 37
  • 48