[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Excluding directories with names that have at-signs works from CLI but not .tarsnaprc?
On 01/01/12 15:04, Mr. Meitar Moscovitz wrote:
> Here's a shortened snippet of my .tarsnaprc file:
>
>> # Exclude files and directories matching specified patterns
>> exclude *.DS_Store
>> exclude .Trash/
>> […]
>> exclude Library/Mail/*gmail.com*
>> exclude Library/Mail/IMAP-meitarm@gmail.com@imap.gmail.com
Do you have any other exclude directives with internal '/' characters? I'm
wondering if that's the problem rather than the @ in the file names.
> While tarsnap obeys the first two exclude directives shown, the last two are not, and the files in my local GMail cache are added to the backup, which is not what I want in this case. However, when I use the same exclusions on the command line, then the directory is rightfully excluded.
>
>> tarsnap -cv -f test-backup --exclude 'Library/Mail/*gmail.com*' ./ # This works.
So to be clear, you're running exactly the same command without the --exclude,
from the same command line, while in the same directory? Nothing else different
like running via sudo or from a cron job? (Just trying to rule out things which
have tripped up people in the past...)
> I've tried a bunch of different shell globbing and syntax workarounds for the .tarsnaprc file but none of them work. I need some help figuring out why this is happening, or what I'm doing wrong.
As a quick test, can you add a line of garbage (e.g., "thisisnotavalidoption")
to your .tarsnaprc and run tarsnap? More ruling out of possibilities -- I'd
like to be certain that the .tarsnaprc file is being processed before worrying
about why the matching isn't working. :-)
--
Colin Percival
Security Officer, FreeBSD | freebsd.org | The power to serve
Founder / author, Tarsnap | tarsnap.com | Online backups for the truly paranoid