Migrating seen database

Bron Gondwana brong at fastmail.fm
Thu Nov 15 15:51:35 EST 2012


On Thu, Nov 15, 2012, at 09:46 PM, Chris Conn wrote:
> On 2012-11-15 15:34, Dan White wrote:
> > On 11/15/12 11:59 +1100, Puthick Hok wrote:
> >> Hi,
> >>
> >> I am migrating my cyrus imap from the current server with cyrus 2.3.7
> >> to a new server with better hardware running cyrus 2.3.16.
> >>
> >> I've googled for the command to dump the seen database in
> >> /var/lib/imap/user/... without success. I have played with some the
> >> cyrus command on my inbox and it made all my emails unread.
> >> Fortunately, only my inbox is affected. It's scary. I have copied the
> >> binary files including the sub database. The subscription or subfolder
> >> (sub database) seems to ok but the seen database is not very good.
> >> Some of my sub folders get all emails unread which is wrong.
> >>
> >> My work around if I cannot find a way to copy the seen database would
> >> be ask everyone to create a folder called Read and create a
> >> Thunderbird rule to move all read emails to this folder prior to
> >> migration. However, there should be a better way than this, except
> >> that I don't know it.
> >>
> >> I hope someone can give me some advices to deal with this problem.
> > You could use an imap synchronization program (like imapsync) to transfer
> > your emails, which will transfer your seen state in a portable format
> > (IMAP).
> >
> 
> Hello,
> 
> My first instinct when I made an upgrade from an antique 2.2.x 
> installation to a 2.3.16 was to use imapsync; but that proved to be 
> cumbersome and also quite slow.  In practice, cyrus upgraded databases 
> perfectly from even such an old install, and I simply copied via rsync 
> the spools and databases and the seen files and had zero issues other 
> than a corrupted tls database that I simply deleted and moved on.
> 
> When you copy the databases and seen files to the new server, it doesn't 
> work correctly?         I am surprised by this.

When you are upgrading 2.3.x to 2.4.x it does an in-place mailbox conversion
the first time you open it.  This conversion copies some data from the .seen
file into the cyrus.index.

If you don't have the .seen files in the right place before starting 2.4,
then any indexes upgraded before the .seen files exist will not have any
seen flags set.  Further, Cyrus will never check the .seen file again for
those mailboxes.

So - get your seen files in place with the right permissions first.  Just
upgrading in-place should always work, because the seen files were already
in the correct spot!

Bron.
-- 
  Bron Gondwana
  brong at fastmail.fm



More information about the Info-cyrus mailing list