From 372e074703a1ba1888395f605813f4d047cc66bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin=20Ob=C5=AFrka?= Date: Thu, 13 Apr 2017 10:15:37 +0200 Subject: Provide interface for limiting pbzip2 processes --- backuper.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3