From 2eebaf5e6b78a8b4fce045ca325ab5544fcd32c4 Mon Sep 17 00:00:00 2001 From: Valentin Vidic Date: Sat, 29 Mar 2008 21:16:06 +0100 Subject: [PATCH] Compress ldap backup. --- src/functions.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 1.7.10.4