Added rsyncable option for gzip using GZ_RSYNCABLE

GZ_RSYNCABLE=TRUE enables --rsyncable for gzip compression. Useful to speed up backups, reduce size of incremental backups, and allow for better deduplication.
This commit is contained in:
teun95
2022-09-07 19:50:50 +01:00
committed by GitHub
parent 428c313c7b
commit cd88285036

View File

@@ -468,7 +468,10 @@ compression() {
case "${COMPRESSION,,}" in
gz* )
compress_cmd="pigz -q -${COMPRESSION_LEVEL} -p ${PARALLEL_COMPRESSION_THREADS} "
if var_true "${GZ_RSYNCABLE}" ; then
gz_rsyncable=--rsyncable
fi
compress_cmd="pigz -q -${COMPRESSION_LEVEL} -p ${PARALLEL_COMPRESSION_THREADS} ${gz_rsyncable}"
compression_type="gzip"
extension=".gz"
dir_compress_cmd=${compress_cmd}