Achim Gottinger
2013-Jul-25 14:57 UTC
[Samba] Cleanup CN=Deleted Objects, DC=DomainDnsZones, DC=domain, DC=local
Hi, Due to an not so well coded dns update script my /var/lib/samba/private/sam.ldb.d/DC=DOMAINDNSZONES,DC=DOMAIN,DC=LOCAL.ldb db consumes now ~500MB. So i decided to delete all the Outdated records. I prepared an list of all the DN's with Base DC=DomainDnsZones,DC=domain,DC=local and Attribute isDeleted=TRUE. There are about 80000 outdated entries whom i plan to delete. If I loop over each line in my list and run ldbdel -H DC=DOMAINDNSZONES,DC=DOMAIN,DC=LOCAL.ldb [DN] it takes about an second for each entry so it would take about 22h to delete them all. Is there a way i can speed things up? Thanks in advance achim~
Achim Gottinger
2013-Jul-25 15:32 UTC
[Samba] Cleanup CN=Deleted Objects, DC=DomainDnsZones, DC=domain, DC=local
Am 25.07.2013 16:57, schrieb Achim Gottinger:> Hi, > > Due to an not so well coded dns update script my > /var/lib/samba/private/sam.ldb.d/DC=DOMAINDNSZONES,DC=DOMAIN,DC=LOCAL.ldb > db consumes now ~500MB. > So i decided to delete all the Outdated records. > I prepared an list of all the DN's with Base > DC=DomainDnsZones,DC=domain,DC=local and Attribute isDeleted=TRUE. > There are about 80000 outdated entries whom i plan to delete. If I > loop over each line in my list and run ldbdel -H > DC=DOMAINDNSZONES,DC=DOMAIN,DC=LOCAL.ldb [DN] it takes about an second > for each entry so it would take about 22h to delete them all. Is there > a way i can speed things up? > > Thanks in advance > achim~ >Found an faster solution using ldbmodify so never mind.