From cd8828503684f81cc6a881a034a7cc85478fe98a Mon Sep 17 00:00:00 2001 From: teun95 <37039643+teun95@users.noreply.github.com> Date: Wed, 7 Sep 2022 19:50:50 +0100 Subject: [PATCH 1/3] 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. --- install/assets/functions/10-db-backup | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/install/assets/functions/10-db-backup b/install/assets/functions/10-db-backup index cf6f70c..e0fee09 100755 --- a/install/assets/functions/10-db-backup +++ b/install/assets/functions/10-db-backup @@ -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} From 00c851eda221b97d5b4a0b52be9b3c79316ed082 Mon Sep 17 00:00:00 2001 From: teun95 <37039643+teun95@users.noreply.github.com> Date: Wed, 7 Sep 2022 19:54:41 +0100 Subject: [PATCH 2/3] Update README.md to include GZ_RSYNCABLE --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a6b7cb9..50e35d7 100644 --- a/README.md +++ b/README.md @@ -166,6 +166,7 @@ Your Organization will be mapped to `DB_USER` and your root token will need to b | `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` | | `ENABLE_PARALLEL_COMPRESSION` | Use multiple cores when compressing backups `TRUE` or `FALSE` | `TRUE` | | `PARALLEL_COMPRESSION_THREADS` | Maximum amount of threads to use when compressing - Integer value e.g. `8` | `autodetected` | +| `GZ_RSYNCABLE` | Use --rsyncable (gzip only) for faster rsync transfers and incremental backup deduplication. e.g. `TRUE` | `FALSE` | | `ENABLE_CHECKSUM` | Generate either a MD5 or SHA1 in Directory, `TRUE` or `FALSE` | `TRUE` | | `CHECKSUM` | Either `MD5` or `SHA1` | `MD5` | | `EXTRA_OPTS` | If you need to pass extra arguments to the backup command, add them here e.g. `--extra-command` | | From a98d33bfdbb9cc14366103499efdffa74e980618 Mon Sep 17 00:00:00 2001 From: teun95 Date: Thu, 8 Sep 2022 11:04:11 +0000 Subject: [PATCH 3/3] Correct table formatting in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 50e35d7..8616fad 100644 --- a/README.md +++ b/README.md @@ -166,7 +166,7 @@ Your Organization will be mapped to `DB_USER` and your root token will need to b | `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` | | `ENABLE_PARALLEL_COMPRESSION` | Use multiple cores when compressing backups `TRUE` or `FALSE` | `TRUE` | | `PARALLEL_COMPRESSION_THREADS` | Maximum amount of threads to use when compressing - Integer value e.g. `8` | `autodetected` | -| `GZ_RSYNCABLE` | Use --rsyncable (gzip only) for faster rsync transfers and incremental backup deduplication. e.g. `TRUE` | `FALSE` | +| `GZ_RSYNCABLE` | Use `--rsyncable` (gzip only) for faster rsync transfers and incremental backup deduplication. e.g. `TRUE` | `FALSE` | | `ENABLE_CHECKSUM` | Generate either a MD5 or SHA1 in Directory, `TRUE` or `FALSE` | `TRUE` | | `CHECKSUM` | Either `MD5` or `SHA1` | `MD5` | | `EXTRA_OPTS` | If you need to pass extra arguments to the backup command, add them here e.g. `--extra-command` | |