On 04/21/2012 12:21 AM, Stefan Tomanek wrote:
> How would you achieve the following with tar alone?
> 
> find / -xdev -cnewer /var/backups/lastrun -path '/var/cache/*' ! -type d 
> -prune -o -print0 -fls /var/backups/filelist \ |
>       tar cpf - --no-unquote --no-recursion --null -T -

This looks like a simple incremental update of /
so I'd use tar's incremental-dump features, and use
the --exclude-caches* or --exclude-tag* options
to selectively exclude components of /var/cache.

> Then -T should probably removed from tar.

No, -T is useful in a trusting environment.  It's only
backups, where the users aren't necessarily trusted,
that are the problem.

Getting back to the original suggestion.  It strikes
me that when dumping a live tree, the kind of diagnostic
that one should get is a "file changed as we read it"
diagnostic, since the problem occurs only when a directory
is modified between the time that tar did a readdir and
the time that tar did the corresponding open.  And perhaps
we would need a different diagnostic for this issue, and
once we did that then you could address the issue with
the --warning=KEYWORD option.  Just thinking aloud -- I
haven't actually read the code recently or anything.

Reply via email to