hi,

On Fri, Aug 15, 2014 at 09:49:20PM +0200, chrysn wrote:
> after a power outage right when i was syncing mails, several consecutive
> folders show the error message:
> 
> Error: unterminated sync state header in 
> /home/chrysn/.mbsync/:poseidonmailbox:mailinglists!intern_:local:mailinglists.intern
> 
> the file
> ~/.mbsync/:poseidonmailbox:mailinglists!intern_:local:mailinglists.intern
> is empty.
>
it would be interesting to know what other variations of the file name
you have there. if you have it with a .new suffix and it looks
reasonable, you may get lucky by just renaming it over the old one
(disable Expunge before you do that - in the worst case, the new state
records the transfer of new messages which got lost during the crash, so
a deletion would be propagated to the server).
the presence and contents (just the tail) of a .journal variant would
also be interesting for diagnostic reasons.

> in case it matters, the file system is btrfs [...], on linux 3.14.
> 
hmpf. i thought it's supposed to be immune to this sort of fail by now,
and that i took all precautions necessary to ensure the correct commit
order ...

what did you configure FSync to?

> i'd be tempted to remove the ~/.mbsync/...intern file, but i'm not
> sure where else state might linger this might conflict with.
>
depending on what else went wrong, you may also need to delete the
.uidvalidity files in the affected maildirs (you'd notice soon enough).
but the result of this would be a two-way propagation of all messages
(so you'd need to delete all dupes afterwards, which is luckily easy
with mutt).

> worst case i can remove the whole folders locally and sync back
> everything from the server (it's just mailing lists folders that
> should already have been in sync), but i'd prefer to know a way out
> should this happen again in an important folder.
> 
mbsync unfortunately has no way to recover from a lost sync state (which
is eqivalent with bootstrapping pre-existing stores - say, a migration
from offlineimap, which comes up here from time to time, last time just
days ago). such a recovery would be heuristical, so there are cases
where it would fail. and somebody needs to implement it.

as long as you have no unpropagated local messages, deleting the local
folders (and remnants of the sync state) and starting from scratch is
the most reasonable recovery.

------------------------------------------------------------------------------
_______________________________________________
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to