Upgrading problems: IMAP recovery

Saim Kim s.kim at hia.rwth-aachen.de
Tue Jul 14 15:38:52 CEST 2009


Hello Gunnar,

Gunnar Wrobel schrieb:
> Quoting Saim Kim <s.kim at hia.rwth-aachen.de>:
>
>> Hello,
>>
>> after succesfully importing the LDAP backup from the old server with
>> your help, I'm now struggeling with the import of the annotations.db
>> file. I checked the mailing list and found several remarks on how to
>> backup the file and the possibilty on just copying the file from a
>> backup. Unfortunatly, the copying didn't do as hoped. After copying I
>> ran the  cyrreconstruct as kolab-r. That didn't change anything -the
>> calendars were still not visible.
>
> The cyrreconstruct does not have anything to do with the annotations 
> as far as I know. I believe it just fixes problems with the messages 
> in the mail folder. The annotations.db file is actually the only place 
> where information about annotations are kept. So the only task should 
> be to get that file restored as required.
ok, that's good to know. I tried to do it another way: I delete the 
content of the /kolab/var/imapd. I then did a rsync with the imap 
content from my backup. I then checked with the cyradm info command and 
this is the result:

Original server:

localhost> info user/test/Kalender at medit.intern
{user/test/Kalender at medit.intern}:
  comment:
  condstore: false
  duplicatedeliver: false
  lastpop:
  lastupdate: 14-Jul-2009 15:25:59 +0200
  partition: default
  sharedseen: false
  size: 6225112
  share-params: 
YToyOntzOjY6InNvdXJjZSI7czo1OiJrb2xhYiI7czo0OiJuYW1lIjtzOjg6IkthbGVuZGVyIjt9
  folder-type: event.default
  incidences-for: readers
  xfb-readable: test at medit.intern test3 at medit.intern


New server:

localhost> info user/test/Kalender at medit.intern
{user/test/Kalender at medit.intern}:
  comment: t/plain
  condstore: false
  duplicatedeliver: false
  lastpop:
  lastupdate:  3-Jul-2009 15:40:24 +0200
  partition: default
  sharedseen: false
  size: 6175303
  share-params: 
OntzOjY6InNvdXJjZSI7czo1OiJrb2xhYiI7czo0OiJuYW1lIjtzOjg6IkthbGVuZGVyIjt9
  folder-type: t.default
  incidences-for: ers
  xfb-readable: t at medit.intern test3 at medit.intern

Interestingly, some of the critical parts are truncated? -> folder-type, 
etc. Any on how to prevent this? I guess this could be one solution to 
my IMAP problem...
>> A manual typesetting to event with the
>> mboxcfg successfully restored a user calendar. For about 30+ users this
>> would be cumbersome...
>
> In the worst case you could script that step.
hmm, as a complete linux noobie this would be really time consuming...
>>
>> I tried to export the annotations.db to skiplist format using the
>> cvt_cyrusdb on the source machine and convert it on the destination
>> machine back to berkeley format. Then I would run the cyrreconstruct
>> command as kolab-r. All the mailboxes are listed but if I check them
>> with "info" from the cyradm interface the kolab specific annotations are
>> missing.
>
> Can you try to dump the database contents to text format using:
>
> /kolab/bin/db_dump /kolab/var/imapd/annotations.db >
> annotations_db_backup.txt

I made a db dump as suggested but when I look into the text file it only 
contains the following information:
VERSION=3
format=bytevalue
type=btree
db_pagesize=4096
HEADER=END
 6d656469742e696e7465726e217368617265645e61647265737362756368002f76656e646f722f6b6f6c61622f666f6c6465722d747970650000

Lots of more numbers here... I guess the dump was successfull.

>> So, in essence: Is there a recommanded way of recovering the
>> annotations.db like the mailbox.db? I tried to convert to flat format
>> and then back to berkeley format but I would get an error message:
>> "Converting from /kolab/var/imapd/annotations.db (berkeley) to
>> /tmp/annotest.test (flat) Warning: apparently empty database converted."
>
> Hm, does not sound too good.
So, after I dumped the annotations.db from the original maschine, how 
can I get it back into berkeley format? I tried to use 
/kolab/bin/cvt_cyrusdb /tmp/annotations.db.txt  flat /tmp/annotations.db 
berkeley. Even though I get the same warning as before ("Warning: 
apparently empty database converted"), I get a resulting annotations.db 
file which is much smaller than before (8 kB compared to 229 kB)? And 
converting it back to flat format results in a 0 kB file?





Ok, so the usual way would be recover the data from backup and just 
copying the annotations.db file to its original location and everything 
should work, right?  Is that also correct for a version change (from 2.2 
to 2.2.2)?

Best regards,
Saim



-- 
--------------------------------------------------------------------------
Dipl.-Ing. Saim Kim
Lehrstuhl fuer Medizinische Informationstechnik
Helmholtz-Institut fuer Biomedizinische Technik
RWTH Aachen
Pauwelsstr. 20, D-52074 Aachen
---
Web:   http://www.medit.hia.rwth-aachen.de/
Tel:   +49-(0)241-80 23218
Fax:   +49-(0)241-80 82442
email: s.kim at hia.rwth-aachen.de
-------------------------------------------------------------------------- 




More information about the users mailing list