On Sat, 2011-11-26 at 18:33 +0200, Mark Zealey wrote:
We're trying to convert users from Maildir to sdbox at present; I'm using dsync to achieve this (2.0.16) however when the user's have been converted we only get minimal information in the caching files. Is there some way to preserve all the caching decisions that were previously made so that when the user logs in to the new mailbox we don't have to cause an io storm rebuilding the cache that we know was good? Dovecot seems to be partially doing this - if i remove the logs/cache from the source mailbox no cache files are built in the conversion; if i put them back then we get a cache file built but it only contains a few bits of information (guid, date.save). Looking into this a bit further i find that when the caches are present at source the fields are preserved but the 'last used' date and caching decisions are not which I suspect means dsync doesn't bother caching on import - only fields with a yes decision in the source are copied (but their decision is only copied as a tmp with the date of import). For example:
How are you calling dsync? Does the destination already exist? I tried with:
rm -rf /tmp/foo; dsync -u tss -m INBOX mirror sdbox:/tmp/foo
It sets all of the cache fields with "yes" or "tmp" decision, as it should. But yes, the "last used" field should probably be copied as well.
Perhaps the problem with you is that dsync actually writes all of the cache fields, but then it does a "cache compression" at the end, which sees that the "last used" fields are so old, so it deletes them.
But yes, it is a problem that dsync doesn't update caching decisions.. Hmm. I guess I'll have to fix that for v2.1.