aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Robin Obůrka <r.oburka@gmail.com> 2017-04-13 10:15:37 +0200
committerGravatar Robin Obůrka <r.oburka@gmail.com> 2017-04-13 10:15:37 +0200
commit372e074703a1ba1888395f605813f4d047cc66bc (patch)
treef6fdeedd6c5aa4a05e29bb73a4cd29cee2abb7d5
parentIn some cases is necessary to ignore changed files (diff)
downloadbackuper-372e074703a1ba1888395f605813f4d047cc66bc.tar.xz
Provide interface for limiting pbzip2 processesHEADmaster
-rw-r--r--backuper.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/backuper.sh b/backuper.sh
index 713d94f..84592ca 100644
--- a/backuper.sh
+++ b/backuper.sh
@@ -27,6 +27,7 @@ TAR_EXTRA_PARAMS=""
TAR_IGNORE_FILE_CHANGE="no"
SSH_EXTRA_PARAMS=""
SSH_CONNECTION=""
+PBZIP2_PROCESSES=""
STORE=""
AFTER=""
FILE_TYPE=""
@@ -180,6 +181,11 @@ ssh_use_connection() {
SSH_CONNECTION="$CONNSTR"
}
+pbzip_processes() {
+ CNT="$1"
+ PBZIP2_PROCESSES="-p$CNT"
+}
+
store() {
STORE="$@"
}
@@ -330,7 +336,7 @@ start_command() {
start_pipeline() {
add_stage "mbuffer -q -m "$MBUFFER_SIZE""
- add_stage "pbzip2"
+ add_stage "pbzip2 $PBZIP2_PROCESSES"
add_stage "mbuffer -q -m "$MBUFFER_SIZE""
add_stage "gpg --trust-model always --batch --yes -z0 $GPG_RECIPIENTS_LIST -e"
## OK, this is strange. If store command fail, mbuffer forks itself with