Re: how to take mdbox extract of time interval and restore that again?

2024-01-03 Thread Aki Tuomi via dovecot


> On 27/12/2023 11:33 EET lutzn via dovecot  wrote:
> 
>  
> Hi!
> 
> Due to a fatal hardware error we have to extract data of all existing imap 
> accounts and all their boxes/folders etc. from an mdbox store starting with 
> the 5th of december until today.  Then we have to restore the old system and 
> import the data back into it.  Mail before 5th will come from the system 
> backup, newer mail from that export.  After that it may be possible that 
> some/few mails may exist twice in the boxes, but that's ok.
> 
> 1.  What would be the command line for doveadm to extract everything starting 
> the 5th?  I find that the command line for doveadm is pretty complicated.  I 
> tried but I am not sure if I really got all mails exported.  So I would like 
> to ask if someone with much more experience can give me a command line that 
> surely does what we want.  The command will be run from a remote machine.
> 

You can use doveadm import to specify search, using doveadm-search-query(7). Be 
careful though, import is not re-entrant, and will happily import same mails 
again.

> 2.  And what would be the command line to restore all the mails that we have 
> exported back into the system?  (The folder and account structure is the 
> same.)
> 

doveadm sync is probably best tool for this.

> 3.  After that some of the mails may exist twice.  Is that a problem, maybe 
> because of internal IDs?
> 

If duplicates appear, you can try using doveadm deduplicate.

> 4.  Are there any other things we need to be aware of when doing that?
> 
> I thank you very much for your help!
> 
> Cheers!
> -lutzn
> 
> 
> ___
> dovecot mailing list -- dovecot@dovecot.org
> To unsubscribe send an email to dovecot-le...@dovecot.org

Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


how to take mdbox extract of time interval and restore that again?

2023-12-27 Thread lutzn via dovecot
Hi!

Due to a fatal hardware error we have to extract data of all existing imap 
accounts and all their boxes/folders etc. from an mdbox store starting with the 
5th of december until today.  Then we have to restore the old system and import 
the data back into it.  Mail before 5th will come from the system backup, newer 
mail from that export.  After that it may be possible that some/few mails may 
exist twice in the boxes, but that's ok.

1.  What would be the command line for doveadm to extract everything starting 
the 5th?  I find that the command line for doveadm is pretty complicated.  I 
tried but I am not sure if I really got all mails exported.  So I would like to 
ask if someone with much more experience can give me a command line that surely 
does what we want.  The command will be run from a remote machine.

2.  And what would be the command line to restore all the mails that we have 
exported back into the system?  (The folder and account structure is the same.)

3.  After that some of the mails may exist twice.  Is that a problem, maybe 
because of internal IDs?

4.  Are there any other things we need to be aware of when doing that?

I thank you very much for your help!

Cheers!
-lutzn


___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org