mourik jan heupink - merit
2014-Sep-02 11:49 UTC
[Samba] safe to replace just one ldb file?
Hi, Small question: I have removed 177000 deleted objects from our DC=DOMAINDNSZONES,DC=...ldb, effectively reducing it's filesize from 1.1GB to 6.3MB. Now I would like to replace the big .ldb with the small .ldb.backup Is it safe to do: - service sernet-samba-ad stop - tdbbackup DC=DOMAINDNSZONES,DC=...ldb -s .backup - mv DC=DOMAINDNSZONES,DC=...ldb DC=DOMAINDNSZONES,DC=...deleted - cp DC=DOMAINDNSZONES,DC=...ldb.backup DC=DOMAINDNSZONES,DC=...ldb - service sernet-samba-ad start As in: is it safe to tdbdump one single ldb file, and replace the ldb with the ldb.backup? It will have a newer timestamp than the other ldb files... Or do I need to tdbbackup them all, and replace them all as well? MJ
On 02/09/14 12:49, mourik jan heupink - merit wrote:> Hi, > > Small question: I have removed 177000 deleted objects from our > DC=DOMAINDNSZONES,DC=...ldb, effectively reducing it's filesize from > 1.1GB to 6.3MB.How did you remove the deleted objects, did you edit the .ldb files in the sam.ldb.d directory ? If so, then you could have damaged your AD, you shouldn't edit these directly. Rowland> > Now I would like to replace the big .ldb with the small .ldb.backup > > Is it safe to do: > - service sernet-samba-ad stop > - tdbbackup DC=DOMAINDNSZONES,DC=...ldb -s .backup > - mv DC=DOMAINDNSZONES,DC=...ldb DC=DOMAINDNSZONES,DC=...deleted > - cp DC=DOMAINDNSZONES,DC=...ldb.backup DC=DOMAINDNSZONES,DC=...ldb > - service sernet-samba-ad start > > As in: is it safe to tdbdump one single ldb file, and replace the ldb > with the ldb.backup? It will have a newer timestamp than the other ldb > files... > > Or do I need to tdbbackup them all, and replace them all as well? > > MJ