[Samba] tdb_rec_read bad magic

Andrew Bartlett abartlet at samba.org
Tue Jul 29 14:07:56 MDT 2014

On Thu, 2014-07-24 at 17:53 +0200, Michał Półrolniczak wrote:
> I think I know what happed to corrupt dns.
> Im thinking that sysadmin did copy samba/dns/private when samba was running.
> And when something broken restore to that version.
> I know that at Backup wiki there is a info about not doing backup of
> running samba, but mayby adding "why" not to do that would open some eyes.

The only way to get some of your data out of such a corrupt database
would be to use the 'ldbdump' tool, which is a low-level tool that will
walk the database looking for possibly valid records.  

I wrote this with the help of 'Rusty' when dealing with a corrupt
database at another site.

The other option would be to try and re-create these databases.  Being
'just' DNS, you might be able to make that work, particularly if you
were to create a BIND9_FLATFILE based zone, and then use
samba_upgradedns to re-import it.  Not trivial, and a fair bit of work,
but you should be able to save the rest of your database. 

Andrew Bartlett

Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba

More information about the samba mailing list