summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2006-09-04 13:59:58 +0000
committerweasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede>2006-09-04 13:59:58 +0000
commit4b8107ea4d3dea6b413b23261ef3da817825b819 (patch)
treeefaaf9174a6c5be128c776f4fa3f1756651d50ab
parent7f04c5ba8478158ed254bc5fc65d99dcf1e19a5c (diff)
Have CONCURRENCY_LEVEL environment
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@177 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
-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"