Bug 31997 - Nightly LDIF backup is corrupted
Nightly LDIF backup is corrupted
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: LDAP
UCS 2.3
Other Linux
: P5 normal (vote)
: UCS 3.2
Assigned To: Erik Damrose
Philipp Hahn
: interim-2
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-17 13:46 CEST by Sönke Schwardt-Krummrich
Modified: 2013-11-19 06:42 CET (History)
2 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sönke Schwardt-Krummrich univentionstaff 2013-07-17 13:46:22 CEST
/var/univention-backup/ldap-backup_*.ldif.gz contains the stderr of slapcat. Problem: the stderr output is injected at random positions within stdout output (the actual LDIF).

---[cut]---
[...]

dn: cn=S-1-5-21-2545846719-49063496434-6083847334-123456,cn=sid,cn=temp51633e09 OVER: db_close
51633e09 OVER: db_destroy
orary,cn
 =univention,dc=my,dc=example,dc=com
objectClass: top
objectClass: lock
lockTime: 1365419802
[...]
---[cut]---
Comment 1 Sönke Schwardt-Krummrich univentionstaff 2013-07-17 14:02:47 CEST
add "-d 0" to the slapcat call to prevent the debug output from the overlay module.
Comment 2 Arvid Requate univentionstaff 2013-07-17 14:47:48 CEST
And maybe replace the 'slapcat >"$ldapbackupname" 2>&1' by

ldapbackuplog="/var/univention-backup/ldap-backup_$(date +%Y%m%d).log"
slapcat >"$ldapbackupname" 2>"$ldapbackuplog"

or something similar.
Comment 3 Erik Damrose univentionstaff 2013-08-28 11:18:41 CEST
A seperate logfile is created during the backup process.

r43510: univention-ldap 10.0.9-7.607.201308281113
Comment 4 Philipp Hahn univentionstaff 2013-09-17 15:44:59 CEST
OK: r43510
OK: zgrep -l OVER /var/univention-backup/ldap-backup_20130*
OK: univention-ldap-backup ; zcat $PWD/ldap-backup_20130917.log.gz
FIXED: ChangeLog r43511 + r44155

FYI: The (useless) debug output is still logged, but now to a different file.
Comment 5 Stefan Gohmann univentionstaff 2013-11-19 06:42:29 CET
UCS 3.2 has been released:
 http://docs.univention.de/release-notes-3.2-en.html
 http://docs.univention.de/release-notes-3.2-de.html

If this error occurs again, please use "Clone This Bug".