Topic: LDAP backup issues: slapcat and 80 columns.
======== Required information ====
- iRedMail version: 0.8.4 and 0.8.4
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Linux/BSD distribution name and version: Scientific Linux 6.2 and CentOS 6.4, both x86_64.
====
Hi,
I am attempting to migrate our email hosting from one server to another, and I'm having a problem with the LDIF files created by the backup_openldap.sh script. I am using the version from 2012-09-05 from BitBucket. As part of the move, I have to edit the LDIF file to reflect the new server details. This can be done with find/replace - easy!
However, I am encountering a problem with the format of the original LDIF file.
For example, if we have a line that should read:
dn: ou=Users,domainName=mydomain.com.xx,o=domains,dc=serverhostname,dc=serverdomain,dc=xx
It will be split over two lines, as follows:
dn: ou=Users,domainName=mydomain.com.xx,o=domains,dc=serverhostname,dc=serverdomain,dc
=xx
A line such as:
homeDirectory: /var/vmail/vmail1/mydomain.com.xx/f/i/n/finch-2012.05.30.16.49.44/
Will appear as:
homeDirectory: /var/vmail/vmail1/mydomain.com.xx/f/i/n/finch-2012.05.30.
16.49.44/
Some investigation has shown me that this is due to the line being 80 columns, and a new line being formed for the 81st. This is true for the .ldiff on the server, as well as those copied via SFTP.
Slapdd does not like this, and fails when restoring from the ldif file.
Short of manually editing all 9000 lines of the document, does anybody have any tips as to how fix this problem? I'm not a programmer (at all) but I'm willing to bet there's a single line of Perl or something that will make the lines whole again.
Thanks!
-Finch.
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.