ldap, mysql, pgsql: use gzip's --rsyncable option
authorintrigeri <intrigeri@boum.org>
Thu, 19 Nov 2009 19:27:46 +0000 (20:27 +0100)
committerintrigeri <intrigeri@boum.org>
Thu, 19 Nov 2009 19:27:46 +0000 (20:27 +0100)
ChangeLog
handlers/ldap.in
handlers/mysql.in
handlers/pgsql.in

index c91ca38f151c503ab11790a39476bb8f3a96c2bd..4a4a3b19fce8928af05a57c10fabe7c96e56a16d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,8 @@ version 0.9.7 -- UNRELEASED
           file or in a given backup action file. Thanks Tuomas Jormola for the
           preliminary patch (Closes: #511299)
     handler changes
           file or in a given backup action file. Thanks Tuomas Jormola for the
           preliminary patch (Closes: #511299)
     handler changes
+       ldap:
+        . Use gzip's --rsyncable option.
        maildir:
         . fix location of deleted_on file
         . add missing destid_file options to ssh connections
        maildir:
         . fix location of deleted_on file
         . add missing destid_file options to ssh connections
@@ -20,6 +22,9 @@ version 0.9.7 -- UNRELEASED
           does not prevent mysqldump to work.
         . Fix the error message displayed when mysqld is not running:
           mysqladmin ping indeed returns 0 when authentication fails.
           does not prevent mysqldump to work.
         . Fix the error message displayed when mysqld is not running:
           mysqladmin ping indeed returns 0 when authentication fails.
+        . Use gzip's --rsyncable option.
+       pgsql:
+        . Use gzip's --rsyncable option.
        sys:
         . New luksheaders option (default=disabled) to backup the Luks header
           of every Luks device.
        sys:
         . New luksheaders option (default=disabled) to backup the Luks header
           of every Luks device.
index 5f402c744ae3fb93065bb82068a3a54cfabbd5a4..853cefb55ce2e0126a00c822b0c7c5cafca5a726 100644 (file)
@@ -86,7 +86,7 @@ if [ "$ldif" == "yes" ]; then
          fi
 
          if [ "$compress" == "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
          else
             execstr="$execstr > $dumpdir/$dbsuffix.ldif"
          fi
index 88ffb1a798fa8d9eec8e1d8587aa439fd4b5768c..e1e89b0a29ccff24d5c8b025f4ece10d0462a940 100644 (file)
@@ -272,7 +272,7 @@ then
             fatal "mysqld doesn't appear to be running!"
          fi
          if [ "$compress" == "yes" ]; 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
          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
             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
          else
             execstr="$DUMP -r $dumpdir/${db}.sql"
          fi
index ff5f7ba1352527be8481732344b78f23df6d2789..a7e3ec2b17338a92c1d8fdfed2987fec7cde5914 100644 (file)
@@ -75,13 +75,13 @@ chmod 700 $vroot$backupdir
 if [ "$databases" == "all" ]; then
    if [ $usevserver = yes ]; then
       if [ "$compress" == "yes" ]; then
 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
       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
       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
    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
          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
          else
             execstr="su - $PGSQLUSER -c \"$PGSQLDUMP $db > $backupdir/${db}.sql\""
          fi