Buchan Milne escreveu:
On Friday 15 August 2008 13:51:37 tamarin p wrote:
Hello,
I'm trying to migrate a directory from OpenLDAP 2.3.x to an OpenLDAP 2.4.11 test installation. My LDAP-experience is less than extensive, but I've run slapcat on the old base, and am now trying to import it back into 2.4.11 with slapadd. The base is large enough that the import will take several days at the current rate (3gb LDIF/approx 4 million entries), and so I can't monitor the process at all times.
It shouldn't take much more than 4 hours on any hardware you should be running in production ...
My problem is with the backend transaction logs, though. These are chucked out at a rate of approximately one per minute until the disk runs out of space. I did a quick google on the issue and found that you should be able to remove logs not currently involved in any transactions by running db_archive -d ( http://www.oracle.com/technology/documentation/berkeley-db/db/ref/transapp/ logfile.html). I've also tried adding a set_flags DB_LOG_AUTOREMOVE in my DB_CONFIG with no luck. Then I figured I could set up a cronjob to run db_archive hourly, but when I run db_archive -d (or more to the point, slapd_db_archive2.4 -d, as I've installed using Buchan Milne's RPMs), not a single log-file is removed.
You can also try it:
for file in $(db_archive -h /var/lib/ldap -a); do rm -f $file; done
Just take care if your ldap database is in /var/lib/ldap