Skip to content

Commit cd88285

Browse files
authored
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.
1 parent 428c313 commit cd88285

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

install/assets/functions/10-db-backup

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,10 @@ compression() {
468468

469469
case "${COMPRESSION,,}" in
470470
gz* )
471-
compress_cmd="pigz -q -${COMPRESSION_LEVEL} -p ${PARALLEL_COMPRESSION_THREADS} "
471+
if var_true "${GZ_RSYNCABLE}" ; then
472+
gz_rsyncable=--rsyncable
473+
fi
474+
compress_cmd="pigz -q -${COMPRESSION_LEVEL} -p ${PARALLEL_COMPRESSION_THREADS} ${gz_rsyncable}"
472475
compression_type="gzip"
473476
extension=".gz"
474477
dir_compress_cmd=${compress_cmd}

0 commit comments

Comments
 (0)