Skiplist recovery?
Richard Wohlstadter
rwohlsta at watson.wustl.edu
Wed Jul 6 10:29:52 EDT 2005
Simon Matter wrote:
>>I've had a couple of my users' seen DBs, which are skiplist, go south
>>recently. Since ctl_cyrusdb in 2.2.12 doesn't actually check the seen
>>databases, I looked around for a recovery utility, but found none. I
>>tried to use cvt_cyrusdb to convert them from skiplist to skiplist and
>>skiplist to text, but I got errors every time. I moved the defective
>>DBs so they could be re-recreated (at least one person was unable to
>>actually re-mark them messages read). From running 'strings' on the bad
>>DBs and comparing a flat-file dump of a good DB, it looks like all or at
>>least most of the data is there--enough that it would be less annoying
>>than having all messages marked unread. So before I dig into this
>>myself, has anyone tried to write a utility that recovers, brutally if
>>necessary, skiplist databases?
We have also seen skiplist corruption in seen databases. I don't have a
recovery tool, but I have been able to manually recover seen db's to the
point of corruption so that at least most of the users mails are in the
correct 'read' state. Typically, you will see errors like:
DBERROR: skiplist recovery /usr/local/imap/user/k/kdelaney.seen: 0D2C
should be ADD or DELETE
If you truncate the file at this point, it should fix the problem, and
the users mail read state will be valid upto the point of corruption.
To do this, convert the hex to decimal (above would be 1372) and use the
dd command:
dd if=kdelaney.seen of=kdelaney.seen.fixed bs=1 count=1372
replace the corrupted .seen file with the fixed one and have user log in
and should be ok.
Seems to work on the couple I have tried it on.
---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
More information about the Info-cyrus
mailing list