projects
/
carnet-upgrade.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b31f79b
)
Compress ldap backup.
author
Valentin Vidic
<vvidic@carnet.hr>
Sat, 29 Mar 2008 20:16:06 +0000
(21:16 +0100)
committer
Valentin Vidic
<vvidic@carnet.hr>
Sat, 29 Mar 2008 20:16:06 +0000
(21:16 +0100)
src/functions.sh
patch
|
blob
|
history
diff --git
a/src/functions.sh
b/src/functions.sh
index
33ac260
..
62dbbe7
100644
(file)
--- 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