Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doveadm backup (rbox-> mdbox) stops if mailbox index has invalid entries #182

Closed
jrse opened this issue Jul 19, 2018 · 0 comments
Closed
Assignees
Labels

Comments

@jrse
Copy link
Contributor

jrse commented Jul 19, 2018

If the rbox mailbox index has invalid entries e.g. a reference to a non-existent mail object, the doveadm backup process to another mailbox format like mdbox will fail.

Fix this to the following behavior:

  • backup all valid mail objects to the other mailbox format
  • print error for all invalid index entries.

Workaround: do a doveadm force-resync before the backup if the index is invalid.

Steps to reproduce:

list objects:
doveadm rmb ls -u t1 -

delete a object with
doveadm rmb delete

do backup to mdbox

doveadm -c /../dovecot-2.2.21/etc/dovecot/dovecot.conf -v -F backup -f -u t1 mdbox:/...dovecot-2.2.21/var/mail/mdbox/
=>
dsync(t1): Warning: Errorcode: -2 cannot get x_attr from object 241c9c1d0486505b406200009c60b9f7, process 26972
dsync(t1): Error: rbox /../dovecot-2.2.21/var/mail/rbox/t1/mailboxes/INBOX/rbox-Mails: Unexpectedly lost uid=60
dsync(t1): Error: Exporting mailbox INBOX failed: Can't lookup GUID for UID=60: Internal error occurred. Refer to server log for more information. [2018-07-19 15:18:20]

@jrse jrse added the bug label Jul 19, 2018
@jrse jrse self-assigned this Aug 6, 2018
jrse added a commit that referenced this issue Aug 8, 2018
    - backup all valid mail objects to the other mailbox format
    - print error for all invalid index entries.
    - new unit test to eval correct error code is set.
jrse added a commit that referenced this issue Aug 8, 2018
jrse added a commit that referenced this issue Aug 9, 2018
jrse added a commit that referenced this issue Aug 9, 2018
jrse added a commit that referenced this issue Aug 13, 2018
@jrse jrse closed this as completed Aug 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant