aboutsummaryrefslogtreecommitdiff
path: root/handlers
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2010-06-14 19:06:59 +0200
committerintrigeri <intrigeri@boum.org>2010-06-14 19:06:59 +0200
commitaeca6912a8f67ecf69ba9b8a436a2a695e5f3acc (patch)
treeb227415a8a15cfd8a1c5b920cef0de0d5657a893 /handlers
parent211d6506cbde8091cb0d6574bb43515cf916166b (diff)
downloadbackupninja-aeca6912a8f67ecf69ba9b8a436a2a695e5f3acc.tar.gz
backupninja-aeca6912a8f67ecf69ba9b8a436a2a695e5f3acc.tar.bz2
Added GZIP_OPTS option, defaulting to --rsyncable.
... so that this option can be disabled on systems that don't support it. This also allows to use another compression program, such as pbzip2 on SMP machines (closes Roundup bug #2405).
Diffstat (limited to 'handlers')
-rw-r--r--handlers/ldap.in2
-rw-r--r--handlers/mysql.in4
-rw-r--r--handlers/pgsql.in8
3 files changed, 7 insertions, 7 deletions
diff --git a/handlers/ldap.in b/handlers/ldap.in
index fda24d0..83307ee 100644
--- a/handlers/ldap.in
+++ b/handlers/ldap.in
@@ -86,7 +86,7 @@ if [ "$ldif" == "yes" ]; then
fi
if [ "$compress" == "yes" ]; then
- execstr="$execstr | $GZIP --rsyncable > $dumpdir/$dbsuffix.ldif.gz"
+ execstr="$execstr | $GZIP $GZIP_OPTS > $dumpdir/$dbsuffix.ldif.gz"
else
execstr="$execstr > $dumpdir/$dbsuffix.ldif"
fi
diff --git a/handlers/mysql.in b/handlers/mysql.in
index 3488c51..4dece24 100644
--- a/handlers/mysql.in
+++ b/handlers/mysql.in
@@ -279,7 +279,7 @@ then
fatal "mysqld doesn't appear to be running!"
fi
if [ "$compress" == "yes" ]; then
- execstr="$VSERVER $vsname exec $DUMP | $GZIP --rsyncable > '$vroot$dumpdir/${db}.sql.gz'"
+ execstr="$VSERVER $vsname exec $DUMP | $GZIP $GZIP_OPTS > '$vroot$dumpdir/${db}.sql.gz'"
else
execstr="$VSERVER $vsname exec $DUMP -r '$vroot$dumpdir/${db}.sql'"
fi
@@ -290,7 +290,7 @@ then
fatal "mysqld doesn't appear to be running!"
fi
if [ "$compress" == "yes" ]; then
- execstr="$DUMP | $GZIP --rsyncable > '$dumpdir/${db}.sql.gz'"
+ execstr="$DUMP | $GZIP $GZIP_OPTS > '$dumpdir/${db}.sql.gz'"
else
execstr="$DUMP -r '$dumpdir/${db}.sql'"
fi
diff --git a/handlers/pgsql.in b/handlers/pgsql.in
index 77a73fe..0b7badf 100644
--- a/handlers/pgsql.in
+++ b/handlers/pgsql.in
@@ -75,13 +75,13 @@ chmod 700 $vroot$backupdir
if [ "$databases" == "all" ]; then
if [ $usevserver = yes ]; then
if [ "$compress" == "yes" ]; then
- execstr="$VSERVER $vsname exec su - $PGSQLUSER -c \"set -o pipefail ; $PGSQLDUMPALL | $GZIP --rsyncable > '$backupdir/${vsname}.sql.gz'\""
+ execstr="$VSERVER $vsname exec su - $PGSQLUSER -c \"set -o pipefail ; $PGSQLDUMPALL | $GZIP $GZIP_OPTS > '$backupdir/${vsname}.sql.gz'\""
else
execstr="$VSERVER $vsname exec su - $PGSQLUSER -c \"$PGSQLDUMPALL > '$backupdir/${vsname}.sql'\""
fi
else
if [ "$compress" == "yes" ]; then
- execstr="su - $PGSQLUSER -c \"set -o pipefail ; $PGSQLDUMPALL | $GZIP --rsyncable > '$backupdir/${localhost}-all.sql.gz'\""
+ execstr="su - $PGSQLUSER -c \"set -o pipefail ; $PGSQLDUMPALL | $GZIP $GZIP_OPTS > '$backupdir/${localhost}-all.sql.gz'\""
else
execstr="su - $PGSQLUSER -c \"$PGSQLDUMPALL > '$backupdir/${localhost}-all.sql'\""
fi
@@ -104,13 +104,13 @@ else
for db in $databases; do
if [ $usevserver = yes ]; then
if [ "$compress" == "yes" ]; then
- execstr="$VSERVER $vsname exec su - $PGSQLUSER -c \"set -o pipefail ; $PGSQLDUMP $db | $GZIP --rsyncable > '$backupdir/${db}.sql.gz'\""
+ execstr="$VSERVER $vsname exec su - $PGSQLUSER -c \"set -o pipefail ; $PGSQLDUMP $db | $GZIP $GZIP_OPTS > '$backupdir/${db}.sql.gz'\""
else
execstr="$VSERVER $vsname exec su - $PGSQLUSER -c \"$PGSQLDUMP $db | > '$backupdir/${db}.sql'\""
fi
else
if [ "$compress" == "yes" ]; then
- execstr="su - $PGSQLUSER -c \"set -o pipefail ; $PGSQLDUMP $db | $GZIP --rsyncable > '$backupdir/${db}.sql.gz'\""
+ execstr="su - $PGSQLUSER -c \"set -o pipefail ; $PGSQLDUMP $db | $GZIP $GZIP_OPTS > '$backupdir/${db}.sql.gz'\""
else
execstr="su - $PGSQLUSER -c \"$PGSQLDUMP $db > '$backupdir/${db}.sql'\""
fi