Skip to content

Commit 4e0878b

Browse files
authored
Merge pull request #150 from teun95/teun95-add-rsync
Add --rsyncable for gzip compression
2 parents 428c313 + a98d33b commit 4e0878b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ Your Organization will be mapped to `DB_USER` and your root token will need to b
166166
| `COMPRESSION_LEVEL` | Numberical value of what level of compression to use, most allow `1` to `9` except for `ZSTD` which allows for `1` to `19` - | `3` |
167167
| `ENABLE_PARALLEL_COMPRESSION` | Use multiple cores when compressing backups `TRUE` or `FALSE` | `TRUE` |
168168
| `PARALLEL_COMPRESSION_THREADS` | Maximum amount of threads to use when compressing - Integer value e.g. `8` | `autodetected` |
169+
| `GZ_RSYNCABLE` | Use `--rsyncable` (gzip only) for faster rsync transfers and incremental backup deduplication. e.g. `TRUE` | `FALSE` |
169170
| `ENABLE_CHECKSUM` | Generate either a MD5 or SHA1 in Directory, `TRUE` or `FALSE` | `TRUE` |
170171
| `CHECKSUM` | Either `MD5` or `SHA1` | `MD5` |
171172
| `EXTRA_OPTS` | If you need to pass extra arguments to the backup command, add them here e.g. `--extra-command` | |

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)