aboutsummaryrefslogtreecommitdiff
path: root/handlers
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2009-11-19 20:27:46 +0100
committerintrigeri <intrigeri@boum.org>2009-11-19 20:27:46 +0100
commitf9672647177f771270f40a858fb94283ff1ebcdf (patch)
treeed5401118f00344405409144825ecd919ba29214 /handlers
parent75d17d06f276ad1aa435d7dc31777677b10917b4 (diff)
downloadbackupninja-f9672647177f771270f40a858fb94283ff1ebcdf.tar.gz
backupninja-f9672647177f771270f40a858fb94283ff1ebcdf.tar.bz2
ldap, mysql, pgsql: use gzip's --rsyncable option
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 5f402c7..853cefb 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 > $dumpdir/$dbsuffix.ldif.gz"
+ execstr="$execstr | $GZIP --rsyncable > $dumpdir/$dbsuffix.ldif.gz"
else
execstr="$execstr > $dumpdir/$dbsuffix.ldif"
fi
diff --git a/handlers/mysql.in b/handlers/mysql.in
index 88ffb1a..e1e89b0 100644
--- a/handlers/mysql.in
+++ b/handlers/mysql.in
@@ -272,7 +272,7 @@ then
fatal "mysqld doesn't appear to be running!"
fi
if [ "$compress" == "yes" ]; then
- execstr="$VSERVER $vsname exec $DUMP | $GZIP > $vroot$dumpdir/${db}.sql.gz"
+ execstr="$VSERVER $vsname exec $DUMP | $GZIP --rsyncable > $vroot$dumpdir/${db}.sql.gz"
else
execstr="$VSERVER $vsname exec $DUMP -r $vroot$dumpdir/${db}.sql"
fi
@@ -283,7 +283,7 @@ then
fatal "mysqld doesn't appear to be running!"
fi
if [ "$compress" == "yes" ]; then
- execstr="$DUMP | $GZIP > $dumpdir/${db}.sql.gz"
+ execstr="$DUMP | $GZIP --rsyncable > $dumpdir/${db}.sql.gz"
else
execstr="$DUMP -r $dumpdir/${db}.sql"
fi
diff --git a/handlers/pgsql.in b/handlers/pgsql.in
index ff5f7ba..a7e3ec2 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 \"$PGSQLDUMPALL | $GZIP > $backupdir/${vsname}.sql.gz\""
+ execstr="$VSERVER $vsname exec su - $PGSQLUSER -c \"$PGSQLDUMPALL | $GZIP --rsyncable > $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 \"$PGSQLDUMPALL | $GZIP > $backupdir/${localhost}-all.sql.gz\""
+ execstr="su - $PGSQLUSER -c \"$PGSQLDUMPALL | $GZIP --rsyncable > $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 \"$PGSQLDUMP $db | $GZIP > $backupdir/${db}.sql.gz\""
+ execstr="$VSERVER $vsname exec su - $PGSQLUSER -c \"$PGSQLDUMP $db | $GZIP --rsyncable > $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 \"$PGSQLDUMP $db | $GZIP > $backupdir/${db}.sql.gz\""
+ execstr="su - $PGSQLUSER -c \"$PGSQLDUMP $db | $GZIP --rsyncable > $backupdir/${db}.sql.gz\""
else
execstr="su - $PGSQLUSER -c \"$PGSQLDUMP $db > $backupdir/${db}.sql\""
fi