[Fusionforge-commits] r12138 - trunk/src/cronjobs

Roland Mas lolando at libremir.placard.fr.eu.org
Thu Feb 3 14:24:47 CET 2011


Author: lolando
Date: 2011-02-03 14:24:47 +0100 (Thu, 03 Feb 2011)
New Revision: 12138

Modified:
   trunk/src/cronjobs/gforge-db-backup.sh
Log:
Compress database dumps according to the configured method

Modified: trunk/src/cronjobs/gforge-db-backup.sh
===================================================================
--- trunk/src/cronjobs/gforge-db-backup.sh	2011-02-03 13:24:36 UTC (rev 12137)
+++ trunk/src/cronjobs/gforge-db-backup.sh	2011-02-03 13:24:47 UTC (rev 12138)
@@ -35,8 +35,12 @@
 # now the actual transfer
 rsync $OPTS $BDIR $DEST/current
 
+export FUSIONFORGE_NO_PLUGINS=true
+COMPRESSOR=$(/usr/share/gforge/bin/forge_get_compressor)
+EXTENSION=$(/usr/share/gforge/bin/forge_get_compressed_extension)
+
 echo "Dumping database"
-su -s /bin/bash postgres -c "pg_dump -F c -d gforge" | gzip -c > ${DEST}/postgres/gforge.dump.gz
+su -s /bin/bash postgres -c "pg_dump -F c -d gforge" | $COMPRESSOR > ${DEST}/postgres/gforge.dump${EXTENSION}
 
 echo "Dumping debconf keys"
 for PAT in $PATTERNS




More information about the Fusionforge-commits mailing list