Re: Suggestion: delta-exclusion = compress-exclusion

Denis Corbin <[email protected]>
Newsgroups gmane.comp.sysutils.backup.dar.support
Message-ID <[email protected]>
On 11/05/2021 23:14, imschmeg wrote:
> It seems very likely to me that all of the masks used for
> compress-exclusion should also be passed in with --exclude-delta-sig as
> well.  It might be useful to have a single option that makes this
> happen.  I'll add a delta-exclusion option to my darrc.

I don't think that all files that we usually exclude from compression
cannot leverage binary delta.

If you have too much exclusion masks for either compression or binary
delta, note that you can rely on DCF file, where you can copy an past
the possibly long list of masks twice, searching/replacing the -Z by -}
in the second copy and feeding the resulting file to dar thanks to -B
option.

> 
> It might also be useful to exclude read-only files from deltas, but I
> don't see how to do that easily.
> 

I don't understand the point: Dar does not modify files under backup,
thus read-only files can benefit from binary delta as well as read-write
files.

But anyway, if you want to do some fancy things while dar does not
provide the exact way to exclude/include what you want, there is a
simple solution:

use the find command to select files and feed its output to dar by mean
of --include-from-file or --exclude-from-file

In your case:

find / -perm -002 -o -perm -020 -o -perm -0200 \
	-o -print > listing.txt
dar --exclude-from-file listing.txt ... other options...

the find command above will print only files that have no write bit set
(user, group and other), the resulting this list will be excluded from
the backup

Your are done

>
OpenPGP_signature (application/pgp-signature, 840 B) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.