Discussion:
[Samba] How to repair corrupt ntprinters.tdb?
(too old to reply)
Christoph Peus
2007-12-06 10:20:06 UTC
Permalink
Hi,

we are using samba 3.0.24 as a printspooler for 80 network printers with
a 500kB ntprinters.tdb for some years now. When we recently restarted
samba we noticed that the ntprinters.tdb automatically shrinked to 24kB
and printing was no longer possible.
tdbdump of the original tdb-file is impossible too:
"Failed to open ntprinters.tdb"

The strange thing about this: we can solve the problem temporarily if we
copy the original 500kB tdb over the shrinked version while samba is
already running! So samba seems to accept the tdb-files contents if it
has been started with a clean tdb-file.

Is there something like a tdb repair-tool? I would be lucky to find a
way of getting all the settings out of this somehow corrupt tdb instead
of rebuilding it from scratch...
Any ideas?

Thanks!

Christoph
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/listinfo/samba
Volker Lendecke
2007-12-06 10:50:07 UTC
Permalink
Post by Christoph Peus
Hi,
we are using samba 3.0.24 as a printspooler for 80 network printers with
a 500kB ntprinters.tdb for some years now. When we recently restarted
samba we noticed that the ntprinters.tdb automatically shrinked to 24kB
and printing was no longer possible.
"Failed to open ntprinters.tdb"
The strange thing about this: we can solve the problem temporarily if we
copy the original 500kB tdb over the shrinked version while samba is
already running! So samba seems to accept the tdb-files contents if it
has been started with a clean tdb-file.
Is there something like a tdb repair-tool? I would be lucky to find a
way of getting all the settings out of this somehow corrupt tdb instead
of rebuilding it from scratch...
Any ideas?
tdbbackup?

Volker
Christoph Peus
2007-12-06 12:00:19 UTC
Permalink
Post by Volker Lendecke
Post by Christoph Peus
Hi,
we are using samba 3.0.24 as a printspooler for 80 network printers with
a 500kB ntprinters.tdb for some years now. When we recently restarted
samba we noticed that the ntprinters.tdb automatically shrinked to 24kB
and printing was no longer possible.
"Failed to open ntprinters.tdb"
The strange thing about this: we can solve the problem temporarily if we
copy the original 500kB tdb over the shrinked version while samba is
already running! So samba seems to accept the tdb-files contents if it
has been started with a clean tdb-file.
Is there something like a tdb repair-tool? I would be lucky to find a
way of getting all the settings out of this somehow corrupt tdb instead
of rebuilding it from scratch...
Any ideas?
tdbbackup?
Thanks, but no luck:

lunkwill tmp # tdbbackup -v ntprinters.tdb
restoring ntprinters.tdb
ntprinters.tdb.bak: No such file or directory
lunkwill tmp # tdbbackup ntprinters.tdb
Failed to open ntprinters.tdb

Regards
Christoph
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/listinfo/samba
Volker Lendecke
2007-12-06 12:30:37 UTC
Permalink
Post by Christoph Peus
lunkwill tmp # tdbbackup -v ntprinters.tdb
restoring ntprinters.tdb
ntprinters.tdb.bak: No such file or directory
lunkwill tmp # tdbbackup ntprinters.tdb
Failed to open ntprinters.tdb
Ok, then you're basically screwed. You might want to look at
it with tdbtool, but to get the data out of the tdb file
and/or repair it you need to be quite familiar with the tdb
format.

Sorry,

Volker
--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
Christoph Peus
2007-12-07 13:20:07 UTC
Permalink
Post by Volker Lendecke
Post by Christoph Peus
lunkwill tmp # tdbbackup -v ntprinters.tdb
restoring ntprinters.tdb
ntprinters.tdb.bak: No such file or directory
lunkwill tmp # tdbbackup ntprinters.tdb
Failed to open ntprinters.tdb
Ok, then you're basically screwed. You might want to look at
it with tdbtool, but to get the data out of the tdb file
and/or repair it you need to be quite familiar with the tdb
format.
tdbtool cannot open it neither:
"Could not open /tmp/ntprinters.tdb: Input/output error"

As the server seems to work well with the corrupt tdb, would "net rpc
printer MIGRATE" be a solution for saving the tdb-files contents to
another samba server? (Or does the migration feature copy the
ntprinters.tdb as is? I doubt it...)
Thanks for your support.

Christoph
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/listinfo/samba
Loading...