I'm considering to move my mails from maildir/mbox to mdbox. One of my doubts is: how can I restore my mails when something terrribly wrong happens.
I understand that I should use doveadm import "backup_location" "mailbox" all.
So I try to import with:
doveadm -v import "sdbox:~/Mail/dbox-temp/spamcop/reports/" "#Dbox/spamcop/reports" all
#Dbox namespace were defined as:
--8<---------------cut here---------------start------------->8--- namespace { hidden = no inbox = no list = yes location = mdbox:~/Mail/Dbox prefix = "#Dbox/" separator = / subscriptions = yes type = private } --8<---------------cut here---------------end--------------->8---
dbox-temp were defined earlier as --8<---------------cut here---------------start------------->8--- namespace { hidden = no inbox = no list = yes location = sdbox:~/Mail/dbox-temp separator = / subscriptions = yes type = private } --8<---------------cut here---------------end--------------->8---
- when I specified for example sdbox:~/Mail/dbox-temp/spamcop/reports/ doveadm search mails under ~/Mail/dbox-temp/spamcop/reports/mailboxes/INBOX/dbox-Mails/
- am I missing something from documentation?
(I expected rather ~/Mail/dbox-temp/mailboxes/spamcop/reports/dbox-Mails)
- when I move dbox-Mails to proper place I got:
doveadm(kjonca): Error: sdbox /home/kjonca/Mail/dbox-temp/spamcop/reports/mailboxes/INBOX/dbox-Mails: Invalid dbox header size doveadm(kjonca): Error: sdbox /home/kjonca/Mail/dbox-temp/spamcop/reports/mailboxes/INBOX/dbox-Mails: Invalid dbox header size
And nothing were imported.
Notices:
a) there were only u.* files, no indexes. b) u.* files were created on i386 system, and import test on amd64.
KJ
-- http://blogdebart.pl/2010/03/17/dalsze-przygody-swinki-w-new-jersey/
On 20.5.2011, at 22.35, Kamil Jońca wrote:
So I try to import with:
doveadm -v import "sdbox:~/Mail/dbox-temp/spamcop/reports/" "#Dbox/spamcop/reports" all
You probably want something more like:
doveadm import sdbox:~/Mail/dbox-temp "#Dbox" mailbox spamcop/reports
dbox-temp were defined earlier as --8<---------------cut here---------------start------------->8--- namespace { hidden = no inbox = no list = yes location = sdbox:~/Mail/dbox-temp separator = / subscriptions = yes type = private } --8<---------------cut here---------------end--------------->8---
This isn't needed.
- when I move dbox-Mails to proper place I got:
doveadm(kjonca): Error: sdbox /home/kjonca/Mail/dbox-temp/spamcop/reports/mailboxes/INBOX/dbox-Mails: Invalid dbox header size
What Dovecot version? I think this is fixed already.
b) u.* files were created on i386 system, and import test on amd64.
Index files use the same format in 32bit and 64bit systems (but not in little vs big endian).
Timo Sirainen <tss@iki.fi> writes:
On 20.5.2011, at 22.35, Kamil Jońca wrote:
So I try to import with:
doveadm -v import "sdbox:~/Mail/dbox-temp/spamcop/reports/" "#Dbox/spamcop/reports" all
You probably want something more like:
doveadm import sdbox:~/Mail/dbox-temp "#Dbox" mailbox spamcop/reports
Thanks.
- when I move dbox-Mails to proper place I got:
doveadm(kjonca): Error: sdbox /home/kjonca/Mail/dbox-temp/spamcop/reports/mailboxes/INBOX/dbox-Mails: Invalid dbox header size
What Dovecot version? I think this is fixed already.
Um. :( Files were created about 2 months ago. It was certainly 1.x, but now it is hard to say, what exactly version it was.
KJ
-- http://sporothrix.wordpress.com/2011/01/16/usa-sie-krztusza-kto-nastepny/ Zuzanka najwyraźniej pełni obowiązki Albina Siwaka w tej ekipie... (C) Slawek Kotynski w dyskusj nt. pl.whatewer.SETI@home...
kjonca@o2.pl (Kamil Jońca) writes:
[...]
- when I move dbox-Mails to proper place I got:
doveadm(kjonca): Error: sdbox /home/kjonca/Mail/dbox-temp/spamcop/reports/mailboxes/INBOX/dbox-Mails: Invalid dbox header size
What Dovecot version? I think this is fixed already.
Um. :( Files were created about 2 months ago. It was certainly 1.x, but now it is hard to say, what exactly version it was.
But question is open: Can I (and how) restore mails from so old backup?
KJ
-- http://modnebzdury.wordpress.com/2009/10/01/niewiarygodny-list-prof-majewski... Suma inteligencji na planecie jest stala, liczba ludzi powieksza sie.
On 21.5.2011, at 1.21, Kamil Jońca wrote:
- when I move dbox-Mails to proper place I got:
doveadm(kjonca): Error: sdbox /home/kjonca/Mail/dbox-temp/spamcop/reports/mailboxes/INBOX/dbox-Mails: Invalid dbox header size
What Dovecot version? I think this is fixed already.
Um. :( Files were created about 2 months ago. It was certainly 1.x, but now it is hard to say, what exactly version it was.
But question is open: Can I (and how) restore mails from so old backup?
Dovecot v2.0 should be able to read v1.x's dbox files. If it can, it can restore the backups. The only difference I can think of is that in some version I changed the default to have dbox save everything under "mailboxes/" directory. If your backups don't use that directory, you can use something like:
doveadm import sdbox:~/Mail/dbox-temp:MAILBOXDIR= "#Dbox" mailbox spamcop/reports
Timo Sirainen <tss@iki.fi> writes:
On 21.5.2011, at 1.21, Kamil Jońca wrote:
- when I move dbox-Mails to proper place I got:
doveadm(kjonca): Error: sdbox /home/kjonca/Mail/dbox-temp/spamcop/reports/mailboxes/INBOX/dbox-Mails: Invalid dbox header size
What Dovecot version? I think this is fixed already.
Um. :( Files were created about 2 months ago. It was certainly 1.x, but now it is hard to say, what exactly version it was.
But question is open: Can I (and how) restore mails from so old backup?
Dovecot v2.0 should be able to read v1.x's dbox files. If it can, it can restore the backups. The only difference I can think of is that in some version I changed the default to have dbox save everything under "mailboxes/" directory. If your backups don't use that directory, you can use something like:
doveadm import sdbox:~/Mail/dbox-temp:MAILBOXDIR= "#Dbox" mailbox spamcop/reports
Unfortunately neither debian 2.0.12 nor 2.0.13 version can import these. Strange thing is that message "Invalid dbox header size" is printed after creating "dovecot-uidvalidity" and dovecot-index* files for source dbox, u.* files are not read at all.
KJ
-- http://blogdebart.pl/2010/03/17/dalsze-przygody-swinki-w-new-jersey/ "Nie można wlecieć w trzecie tysiaclecie na drzwiach od stodoły" - biskup polowy WP Sławoj Leszek Głódź.
On Sun, 2011-05-22 at 07:27 +0200, Kamil Jońca wrote:
Um. :( Files were created about 2 months ago. It was certainly 1.x, but now it is hard to say, what exactly version it was.
But question is open: Can I (and how) restore mails from so old backup?
Dovecot v2.0 should be able to read v1.x's dbox files. If it can, it can restore the backups. The only difference I can think of is that in some version I changed the default to have dbox save everything under "mailboxes/" directory. If your backups don't use that directory, you can use something like:
doveadm import sdbox:~/Mail/dbox-temp:MAILBOXDIR= "#Dbox" mailbox spamcop/reports
Unfortunately neither debian 2.0.12 nor 2.0.13 version can import these. Strange thing is that message "Invalid dbox header size" is printed after creating "dovecot-uidvalidity" and dovecot-index* files for source dbox, u.* files are not read at all.
Oh. I think it's entirely possible that current v2.0 can't really read v1.x dbox without giving errors..
participants (2)
-
kjonca@o2.pl
-
Timo Sirainen