[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How are --exclude patterns interpreted?
On 07/30/13 20:43, Tom Limoncelli wrote:
> Does --exclude follow the same rules as rsync? I couldn't find
> explicit details in the man page for tarsnap or tarsnap.conf (or the
> website). Am I not looking in the right place?
They follow shell globbing rules.
> In particular:
> Suppose I have a filesystem /foo and don't want /foo/tmp to be
> backuped. Should I specify --exclude=foo/tmp or --exclude=/foo/tmp?
> I can't use --exclude=tmp because there are other directories called
> "tmp".
You want --exclude=foo/tmp, since the leading '/' is stripped before
paths are compared against exclusions.
--
Colin Percival
Security Officer Emeritus, FreeBSD | The power to serve
Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid