[rear-devel] RFC: Have BACKUP_PROG_OPTIONS --anchored by default?

Schlomo Schapiro schlomo at schapiro.org
Tue Oct 14 15:07:26 CEST 2014


Good point!  Can you say if this anchored option is also supported on older
tar versions like the ones found in RHEL4/5 or SLES 9?

We should not forget our users who are chained to old OS versions.
Am 14.10.2014 09:50 schrieb "Gratien D'haese" <gratien.dhaese at it3.be>:

> Hi,
>
> I think it makes sense - please copy/paste this request into an issue
> tracker.
> Then we can act on it (and it is tracked, so we know why we did it
> afterwards).
>
> rgds,
> Gratien
>
> On Wed, 8 Oct 2014 16:54:08 +0200 (CEST), Johannes Meixner <jsmeix at suse.de>
> wrote:
>
>> Hello,
>>
>> when e.g. EXCLUDE_RECREATE contains something like "fs:/tmp" then
>> /usr/share/rear/layout/prepare/default/61_exclude_from_restore.sh
>> generates during "rear recover" the tar exclude patterns
>> 'tmp' and 'tmp/*' (in /tmp/rear.*/tmp/restore-exclude-list.txt).
>>
>> Because how tar pattern matching works in particular the 'tmp'
>> exclude pattern result that any files that contain '/tmp'
>> in their path get excluded from restore, for example files
>> (and directories) like /usr/tmp or /var/spool/cups/tmp
>> and so on.
>>
>> The 'tmp' above is only an example. The issue happens for all
>> short values that become autogenerated tar exclude patterns.
>>
>> Therefore - to be by default more on the safe side - I think
>> it would make sense to have BACKUP_PROG_OPTIONS="--anchored"
>> in /usr/share/rear/conf/default.conf
>>
>> I think if a user really wants it, he can use '*tmp*' to exclude
>> all files that have 'tmp' somewhere in their path.
>>
>> By the way:
>> I wonder why two tar exclude patterns 'tmp' and 'tmp/*' are generated.
>> As far as I tested it, 'tmp' excludes a superset of 'tmp/*'
>> so that it seems 'tmp/*' is superfluous.
>>
>> FYI, see
>> http://www.gnu.org/software/tar/manual/html_section/tar_50.html
>> how tar pattern matching works, in particular it reads:
>> --------------------------------------------------------------------
>> If anchored, a pattern must match an initial subsequence of the
>> name's components. Otherwise, the pattern can match any subsequence.
>> Default is `--no-anchored' for exclusion members
>> and `--anchored' inclusion members.
>> --------------------------------------------------------------------
>> and perhaps even more obviously "man 1 tar" reads:
>> --------------------------------------------------------------------
>>   --anchored
>>       patterns match file name start
>> ...
>>   --no-anchored
>>       patterns match after any `/' (default for exclusion)
>> --------------------------------------------------------------------
>>
>>
>> Kind Regards
>> Johannes Meixner
>>
>
> --
> Gratien D'haese
> IT3 Consultants bvba
> Vennestraat 15, B-2560 Nijlen
> _______________________________________________
> rear-devel mailing list
> rear-devel at lists.relax-and-recover.org
> http://pikachu.3ti.be/mailman/listinfo/rear-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://pikachu.3ti.be/pipermail/rear-devel/attachments/20141014/7baa337f/attachment.html>


More information about the rear-devel mailing list