I can’t find any documentation, how to specify the values for --add-never-compress
: is it .mp4
, mp4
or *.mp4
and is it case insensitive?
I looked at the relevant source code:
- it is not a glob pattern, it is matched against the result of
path/filePath.Ext()
, which takes the extension from the current file. The string must include the dot:.mp4
- the match is case sensitive.
Is it comma or whitespace seperated?
A full example would be helpfull e.g. --add-never-compress=.mp4 .MP4 .7z .7Z
or --add-never-compress=".mp4 .MP4 .7z .7Z"
A list of extension can be found here
I was just testing this and the only thing I could make work was to add a separate flag for each instance eg.
--add-never-compress=.mp4 --add-never-compress=.7z
or to save some effort:
--add-never-compress=.[mM][pP]4 --add-never-compress=.7[zZ]
if you do --add-never-compress=.aac,.mp3
it’ll literally enter “.aac,.mp3”
Would love to learn of a better option! I have way too many for this dediousness so I use the UI to enter it for the time being.
Well,
According to:
If you don’t use really “heavy” compression methods, you don’t need “exclude” already compressed files.
I think it isn’t an answer to the question. Neither this forum, nor official program “help” or github “issues”, as well online documentation specifying correct format for the particular option:
--add-never-compress=
As of Kopia v0.19.0, I see the *.mp4
syntax, but
- that’s a glob not an extension so the UI is slightly misleading
- there’s no example of how to separate multiple globs: with
,
? Or;
? - it doesn’t say if it’s case sensitive or not
To answer your three points:
- I opened a PR to hopefully fix this: fix(kopiaui): Remove misleading asterisk from extension placeholders by kdkasad · Pull Request #327 · kopia/htmlui · GitHub
- In the placeholder there isn’t, but in the description on the left in your screenshot, it says “one extension per line”
- It does appear to be case sensitive based on how the filenames are checked (source). I think it should be case insensitive (or at least have an option to be), so I’ll try to open a PR for that as well.