7z as a global option, but new backups are set to zip

Hi, in the general preferences I have set the compression algorithm to “7z”. But if I define a new backup set, that option is not displayed and in the advanced options of this set I will find “zip” as the compression algo. Is there a bug of failed inheritance?
Duplicati -

Yes, this happens because the “General preferences” are passed to all backups when they run.

The zip setting is applied when creating an new backup.
You cannot create a backup without setting the compression module, so actually you cannot overwrite the compression module from the preferences.

But I think this reveals another problem, namely that it is not easy to understand which options are actually applied if you set both general and “local” options.

Also, I should say that we have identified a number of issues with 7z, so I recommend not using it, unless you have verified that it works fine for you.

Oh no, please don’t say that :frowning:

Unfortunately, that is how it is:

Oh, thx for the links. I will convert my backups to .zip which is sad… hours of upload again :frowning:

Just to clarify when you mean 7z are you referring to LZMA compression method. Should we stick to the default DEFLATE?

No, I refer to the LZMA2 compression, enabled with --compression-module=7z which also changes the file extension to .7z instead of .zip.

You can change the --zip-compression-method=LZMA without any problems AFAIK.

If the compression method (in this case LZMA2) is what matters most for final dblock (archive file) size, then what’s the difference between using it in a ZIP for 7z container - speed of compression?

The container is not really important, but zip does not support LZMA2 (at least the library Duplicati uses does not support it). The 7z library does support LZMA2 which has better compression ratio, but at the cost of more memory and more processing power requirements (i.e. 7z is slower at compressing, but produces smaller files).

The 7z container also uses full-archive compression, where zip is using pr. stream compression. This means that there is a greater potential for compression, as 7z can look at the entire 50MB data and compress that, where zip only compresses each individual 100kb block.

1 Like

Lzma2 is faster when using 4 or more cores and it gives better compression. LZMA is default and general compression method of 7z format… Generally speaking (unless you are creating large archives) there is no reason to need more than one though. In addition, with multiple cores doing the compression, the bottleneck may become the hard drive. 7-Zip also supports encryption with AES-256 algorithm. This algorithm uses cipher key with length of 256 bits. To create that key 7-Zip uses derivation function based on SHA-256 hash algorithm. A key derivation function produces a derived key from text password defined by user. For increasing the cost of exhaustive search for passwords 7-Zip uses big number of iterations to produce cipher key from text password.