[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exclude patterns in tarsnaprc



Bob Williams <linux@barrowhillfarm.org.uk> wrote:

> Jamie,
>
> Many thanks for your timely intervention and very clear explanation.
> Perhaps the manpage could include some examples?

No problem! Applogies if it came across a bit ranty, I hadn't slept for
2 days, and my OCD was running high. I'm calm now though :-)

I don't mind tidying it up if Colin wants to make use of it.

But it does bring to light a problem I've been meaning to bring up
for some time:

Basically, unless I'm wrong (there's a first for everything.. *cough*
heehee :-) ), the only way to exclude something reliably (without
potentially excluding something else accidentally) is to always use
absolute paths - i.e. both the backup path and exclude path must
 begin with '/'.

It would be nice if relative paths could be used, with some
mechanism to 'anchor' the exclude pattern to the start of the path
(in a way I originally assumed already happened with, for
example, '--exclude usr/src')

Or at least, it should be highlighted as a 'gotcha'.

The above was a real-life example for me: I was originally using
a backup path of '.' from a working directory of '/' and happened
to notice that my exclude of usr/src also knocked out a temporary
...usr/src... I had in a jail. Not a problem in this case, but
it's entirely reasonable a user may have a personal path for his/her
files containing 'usr/src' etc.

Finally, I know I mentioned it in my previous message, but don't
forget the '---dry-run' option, that goes through the whole process
without actually doing any backup - invaluable for testing where
you don't have to waste time (and money!) watching a backup run
to see if it behaves as expected!

Cheers,
     Jamie