diff options
author | Peter Palfrader <peter@palfrader.org> | 2006-09-04 13:59:58 +0000 |
---|---|---|
committer | weasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede> | 2006-09-04 13:59:58 +0000 |
commit | 4b8107ea4d3dea6b413b23261ef3da817825b819 (patch) | |
tree | efaaf9174a6c5be128c776f4fa3f1756651d50ab /backup-mysql | |
parent | 7f04c5ba8478158ed254bc5fc65d99dcf1e19a5c (diff) |
Have CONCURRENCY_LEVEL environment
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@177 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
Diffstat (limited to 'backup-mysql')
-rwxr-xr-x | backup-mysql | 6 |
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" |