linuxscripts icon indicating copy to clipboard operation
linuxscripts copied to clipboard

Generic temp dir exclusion

Open zer opened this issue 2 years ago • 4 comments

Hi, I like these rules a lot overall, thanks very much. But I'm not sure if this generic temp dir exclusion isn't a bit too eager: https://github.com/deajan/linuxscripts/blob/29d18ca606d122ca73830bac811e2984220ec314/burp/incexc/generic_exclusions#L20-L21

I believe it would also match on both files and directories that just start with with [Tt]e?mp, like Temperature or Templates.msf. At least the latter seems to be missing in the manifest file in my tests with the inclusions and burp.

[Tt]e?mp\b would fix that but it would require another exclusion for stuff like Temporary or more that was maybe intended with the rule.

The generic cache rule is kind of in a similar predicament since it would match files like /usr/share/perl5/core_perl/FileCache.pm. https://github.com/deajan/linuxscripts/blob/29d18ca606d122ca73830bac811e2984220ec314/burp/incexc/generic_exclusions#L23-L24 But maybe a trailing slash would work well enough here?

zer avatar May 23 '23 21:05 zer

Hi,

Thanks for the report ;)

I've not worked with that list for ages, actually transformed them into glob pattens for use with my latest project, see https://github.com/netinvent/npbackup/tree/main/excludes

Maybe fixing the regex to exclude_regex = .*/[Tt]e?mp$ would do indeed. And yes, you'd need to add exclude_reges = .*/Temporary$

I think a trailing '$' would be enough for the second problem. What do you think ?

What are you using the list for ?

deajan avatar Jun 02 '23 15:06 deajan

Your newer glob pattern look nice, thanks a lot! I'll take a closer look.

I'm in the process of trying out various tools like burp, borg, duplicacy, restic (etc.) for backups of both Window and Linux clients. So a starting point with excludes like your list reduced the initial startup time! Thanks again. I just noticed these small things and wanted to give my feedback.

Oh, I see npbackup is a full backup solution on top of restic... I'll evaluate it for sure. 👍

zer avatar Jun 02 '23 15:06 zer

I've done the same not so long ago and came up with some benchmarks between newer tools, maybe this will safe you some time https://github.com/deajan/backup-bench

Disclaimer, I ended up building NPBackup around restic in order to have remote upgrades (like burp has), prometheus support and way better windows support than those tools usually provide.

deajan avatar Jun 02 '23 16:06 deajan

Btw, released NPBackup v2.2 today, the RC phase was quite long. I'd love to get some feedback if perhaps you would try that solution too.

deajan avatar Jun 03 '23 15:06 deajan