summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbackup-mysql6
1 files changed, 5 insertions, 1 deletions
diff --git a/backup-mysql b/backup-mysql
index af162b4..4826415 100755
--- a/backup-mysql
+++ b/backup-mysql
@@ -28,6 +28,10 @@ if [ -z "$HOSTS" ]; then
HOSTS="localhost"
fi
+if [ -z "$CONCURRENCY_LEVEL" ]; then
+ CONCURRENCY_LEVEL=1
+fi
+
for host in $HOSTS; do
if [ "$host" = "localhost" ]; then
prefix="";
@@ -61,7 +65,7 @@ for host in $HOSTS; do
for db in $DBs; do
file="$TARGET/$DATE-$prefix$db"
echo $file
- done | xargs --no-run-if-empty --max-procs 4 -n 1 bzip2
+ done | xargs --no-run-if-empty --max-procs "$CONCURRENCY_LEVEL" -n 1 bzip2
for db in $DBs; do
file="$TARGET/$DATE-$prefix$db"