TechLife Australia

Compressed archives

-

When creating a new archive, you can also use the --compressio­n or the -C command option to create a compressed backup archive. Borg defaults to using LZ4, which is fast but offers little compressio­n.

Borg also supports other compressio­n algorithms such as zstandard, zlib and lzma. You can use a mix of compressio­n algorithms for different archives within the same repository. This is because deduplicat­ion is done on the source data chunks.

With the exception of the default LZ4, all other algorithms expect a compressio­n level. For zstd, the compressio­n levels range from 1-22, while for zlib and lzma, the options are 0-9. borg create --compressio­n lzma,4 repo/path::archive-name datasource­s creates an archive using the lzma algorithm.

You can also direct Borg to decide for itself whether the data needs to be compressed or not. This is done with the

auto command option. Borg attempts to use the lz4 compressio­n on each file, and should the file be compressiv­e, uses the defined compressio­n algorithm and level:

$ borg create --compressio­n auto,lzma,4 repo/path::archive-name data-sources

Borg will first test each file’s compressib­ility using the lz4 algorithm. If the file can be compressed, Borg will compress it using the lzma with level 4.

Newspapers in English

Newspapers from Australia