[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Excluding directories with names that have at-signs works from CLI but not .tarsnaprc?
Hi there,
I've just begun trying out tarsnap and while much of it seems awesomely simple, I'm seeing some behavior that is hopefully just my own unfamiliarity with the tool rather than a bug, but it's confusing me nonetheless.
I have some large directories that I'd like to exclude from my tarsnap backup archive. When I try to exclude them using the `exclude` directive in my .tarsnaprc file, they are not excluded, but when I try to exclude them from the command line, they are excluded. Why might this be happening? My first guess was that all the problem directories had at-signs (@) in their names, but apparently this shouldn't make a difference, right?[0]
For what it's worth, I'm using Mac OS X and trying to avoid backing up email that is already stored elsewhere.
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
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.
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.
Thanks in advance for your help. :)
Cheers,
-Meitar Moscovitz
Personal: http://maymay.net
Professional: http://MeitarMoscovitz.com
EXTERNAL REFERENCES:
[0] https://twitter.com/cperciva/status/153608909683310592