From: Valentin Vidic Date: Sat, 29 Mar 2008 20:16:06 +0000 (+0100) Subject: Compress ldap backup. X-Git-Tag: debian/4.0.1~11 X-Git-Url: http://ftp.carnet.hr/pub/carnet-debian/scm?a=commitdiff_plain;h=2eebaf5e6b78a8b4fce045ca325ab5544fcd32c4;p=carnet-upgrade.git Compress ldap backup. --- diff --git a/src/functions.sh b/src/functions.sh index 33ac260..62dbbe7 100644 --- a/src/functions.sh +++ b/src/functions.sh @@ -373,7 +373,7 @@ add_group_proc () { # backup ldap database backup_slapd_db () { - local ldap_backup=/var/backups/slapcat.$backup_ext + local ldap_backup=/var/backups/slapcat.$backup_ext.gz local old_umask result if [ ! -f $ldap_backup ]; then @@ -383,7 +383,7 @@ backup_slapd_db () { /etc/init.d/slapd stop || true old_umask=`umask` umask 0077 # protect the backup file - slapcat -l $ldap_backup + slapcat | gzip --best > $ldap_backup result=$? umask $old_umask /etc/init.d/slapd start || true