Recover Berkeley DB File

Panayotis Tsiamis ptsiamis at internet.gr
Thu Mar 30 12:08:36 EEST 2006


To problima einai to exeis, kratao se bdb dns lookups
pou kanei o webaliser alla ana takta xronika diastimata
ginete corrupted. Yparxei tropos oste na mporo na ti kano recover
i tha anagasto na balo ena djbdns cache sto mixanaki?

$ file dns_cache.db.old.2
dns_cache.db.old.2: Berkeley DB (Hash, version 8, native byte-order)

$ db_verify dns_cache.db.old.2
db_verify dns_cache.db.old.2
db_verify: Page 860: item 128 hashes incorrectly
db_verify: Page 861: item 134 hashes incorrectly
db_verify: Page 2134: item 6 hashes incorrectly
db_verify: Page 2934: non-empty page in unused hash bucket 2329
db_verify: Page 0: page 4824 encountered a second time on free list
db_verify: DB->verify: dns_cache.db.old.2: DB_VERIFY_BAD: Database 
verification failed


$ db_stat -d dns_cache.db.old.2
61561   Hash magic number.
8       Hash version number.
Flags:  little-endian
4096    Underlying database page size.
0       Specified fill factor.
149359  Number of keys in the database.
149359  Number of data items in the database.
2329    Number of hash buckets.
1584766 Number of bytes free on bucket pages (83% ff).
0       Number of overflow pages.
0       Number of bytes free in overflow pages (0% ff).
778     Number of bucket overflow pages.
2866515 Number of bytes free in bucket overflow pages (10% ff).
0       Number of duplicate pages.
0       Number of bytes free in duplicate pages (0% ff).
1       Number of pages on the free list.


--
thnx panayotis




More information about the Linux-greek-users mailing list