Re: How to get rid of Berkeley DB

2004-04-15 Thread Colin Bruce
Dear Mark,

Thanks for the help. Your idea worked a treat. I also had to mess around
with the files in the db directory but I worked all that out it seemed
to work okay. Just in case anyone else wants to do that (as I've copied
this to the list). Here's what I did to convert the seen database from
Berkeley DB to skiplist.

1.  stop the server
2.  run db_recover in var/imap/db
3.  rm the log file from var/imap/db and any left over __db files
4.  cd var/imap/user
5.  run a script which for each seen file in every directory did a db_dump
and a db_load
6.  repeat steps 2 and 3 at this point
7.  run a script which Mark suggested that converts every file from BDB
to skiplist. Once all the conversions are complete rename all the
skiplist files to replace the seen files.
8.  repeat steps 2 and 3
9.  now edit impad.conf and set seenstate_db: to skiplist
10. Make sure that the var/imap/db directory contains nothing other than
the file called skipstamp.
11. start master and all should be fine. There should be no errors in
imapd.log about PANICs or DB errors.

This worked for me anyway so perhaps it might be useful for others. I
risked it because the seen files could be lost and it wouldn't be a total
disaster. Perhaps on other databases it might not be much good.

Best wishes.
Colin

On Thu, 15 Apr 2004, Mark Keasling wrote:

> Did you try converting all of the ".seen" berkeley db files to skiplist before
> moving them?  After stopping cyrus, something like this might work for you:
>
> cd var/user
> for f in */*.seen
> do
> cvt_cyrusdb `pwd`/$f berkeley `pwd`$f.new skiplist
> done
>

---
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


Re: How to get rid of Berkeley DB

2004-04-15 Thread Colin Bruce
Dear Mark,

Thanks for the info. That idea worked on my test system (which is a copy
of the live system). I'll try it on the real system tonight when everyone
has gone home. There are other problems now as well. I wish I'd never
heard of BDB :-(

Best wishes...
Colin

On Thu, 15 Apr 2004, Mark Keasling wrote:

> Did you try converting all of the ".seen" berkeley db files to skiplist before
> moving them?  After stopping cyrus, something like this might work for you:
>

---
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


Re: How to get rid of Berkeley DB

2004-04-14 Thread Mark Keasling
Hi,

Did you try converting all of the ".seen" berkeley db files to skiplist before
moving them?  After stopping cyrus, something like this might work for you:

cd var/user
for f in */*.seen
do
cvt_cyrusdb `pwd`/$f berkeley `pwd`$f.new skiplist
done

Rename the files keeping the old version just in case something fails.

for f in */*.seen
do
mv $f $f.old_bdb
mv $f.new $f
done

Regards,
Mark Keasling <[EMAIL PROTECTED]>

---
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