Re: doveadm backup empties the remote host? SERIOUSLY???

2024-04-29 Thread Public via dovecot

On 4/27/24 16:30, Nils via dovecot wrote:
I have a file backup and since that backup, new emails have been 
received. Also, not all of the emails were deleted - many folders 
weren't affected. Additionally I was able to restore a few of the 
deleted emails with ext4magic.


So now I have three sources:

1. MAIN (new dovecot) contains the emails in the folders that weren't
   deleted and the emails received after the incident.
2. BACKUP (of mail directory) contains all emails from last backup date
   (including those still in the folders that weren't deleted).
3. RECOVER (directory) contains deleted email files that were recovered.

How can I join these sources into MAIN,

 * without deleting any emails from MAIN (for example those that have
   been received today) and
 * with only reading and not writing into BACKUP and RECOVER?

Is there any more or less convenient way to achieve that?
If not, can I just dump all the files together and make dovecot 
recreate the indexes?

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


Will doveadm-import automatically detect if a message already exists or 
could I end up with duplicates? Or is it unnecessary to worry about that 
because of the unique filename each message has?

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


Re: doveadm backup empties the remote host? SERIOUSLY???

2024-04-29 Thread Aki Tuomi via dovecot

> On 29/04/2024 12:02 EEST Nils via dovecot  wrote:
> 
>  
> On 4/27/24 16:30, Nils via dovecot wrote:
> > I have a file backup and since that backup, new emails have been 
> > received. Also, not all of the emails were deleted - many folders 
> > weren't affected. Additionally I was able to restore a few of the 
> > deleted emails with ext4magic.
> >
> > So now I have three sources:
> >
> > 1. MAIN (new dovecot) contains the emails in the folders that weren't
> >    deleted and the emails received after the incident.
> > 2. BACKUP (of mail directory) contains all emails from last backup date
> >    (including those still in the folders that weren't deleted).
> > 3. RECOVER (directory) contains deleted email files that were recovered.
> >
> > How can I join these sources into MAIN,
> >
> >  * without deleting any emails from MAIN (for example those that have
> >    been received today) and
> >  * with only reading and not writing into BACKUP and RECOVER?
> >
> > Is there any more or less convenient way to achieve that?
> > If not, can I just dump all the files together and make dovecot 
> > recreate the indexes?
> > ___
> > dovecot mailing list -- dovecot@dovecot.org
> > To unsubscribe send an email to dovecot-le...@dovecot.org
> 
> Will doveadm-import automatically detect if a message already exists or 
> could I end up with duplicates? Or is it unnecessary to worry about that 
> because of the unique filename each message has?

doveadm import will happily import same emails over & over again. It has no 
such check. You should use doveadm sync -1 instead. (-1 = one way)

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


Re: doveadm backup empties the remote host? SERIOUSLY???

2024-04-29 Thread Nils via dovecot

On 4/27/24 16:30, Nils via dovecot wrote:
I have a file backup and since that backup, new emails have been 
received. Also, not all of the emails were deleted - many folders 
weren't affected. Additionally I was able to restore a few of the 
deleted emails with ext4magic.


So now I have three sources:

1. MAIN (new dovecot) contains the emails in the folders that weren't
   deleted and the emails received after the incident.
2. BACKUP (of mail directory) contains all emails from last backup date
   (including those still in the folders that weren't deleted).
3. RECOVER (directory) contains deleted email files that were recovered.

How can I join these sources into MAIN,

 * without deleting any emails from MAIN (for example those that have
   been received today) and
 * with only reading and not writing into BACKUP and RECOVER?

Is there any more or less convenient way to achieve that?
If not, can I just dump all the files together and make dovecot 
recreate the indexes?

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


Will doveadm-import automatically detect if a message already exists or 
could I end up with duplicates? Or is it unnecessary to worry about that 
because of the unique filename each message has?

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


Re: doveadm backup empties the remote host? SERIOUSLY???

2024-04-27 Thread Nils via dovecot

On 4/27/24 12:31, Aki Tuomi via dovecot wrote:

Yeah. Backup command, without -R backs to location, not from location.
  
Mailman archive is athttps://www.dovecot.org/mailman3/mailman3/lists/
  
Aki

___
dovecot mailing list --dovecot@dovecot.org
To unsubscribe send an email todovecot-le...@dovecot.org
I have a file backup and since that backup, new emails have been 
received. Also, not all of the emails were deleted - many folders 
weren't affected. Additionally I was able to restore a few of the 
deleted emails with ext4magic.


So now I have three sources:

1. MAIN (new dovecot) contains the emails in the folders that weren't
   deleted and the emails received after the incident.
2. BACKUP (of mail directory) contains all emails from last backup date
   (including those still in the folders that weren't deleted).
3. RECOVER (directory) contains deleted email files that were recovered.

How can I join these sources into MAIN,

 * without deleting any emails from MAIN (for example those that have
   been received today) and
 * with only reading and not writing into BACKUP and RECOVER?

Is there any more or less convenient way to achieve that?
If not, can I just dump all the files together and make dovecot recreate 
the indexes?

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


Re: doveadm backup empties the remote host? SERIOUSLY???

2024-04-27 Thread Aki Tuomi via dovecot
 
 On 27/04/2024 12:57 EEST Nils via dovecot 
 wrote:
  
  
 On 4/26/24 14:04, Aki Tuomi wrote:
  We have migration guide, see
  https://doc.dovecot.org/admin_manual/migrating_mailboxes/
  Aki
 regarding this guide:
 I am supposed to set up doveadm service on the old server and then
 call
 "doveadm backup -Ru username tcp:host:port"
 on the new server? So the reason that doveadm deleted everything
 yesterday was that I forgot the -R option?
  
 "The doveadm backup command forces the destination to look exactly
 like
 the source, deleting mails and mailboxes if necessary."
 Why did doveadm backup create (empty) mailboxes on the new server,
 when
 I mistakably used it in the wrong direction?
  
 -
  
 Had to switch of the email server for over 10 hours yesterday. any
 messages might not have reached me. is there a mailman archive?
 ___
 dovecot mailing list -- dovecot@dovecot.org
 To unsubscribe send an email to dovecot-le...@dovecot.org
Yeah. Backup command, without -R backs to location, not from location.
 
Mailman archive is at https://www.dovecot.org/mailman3/mailman3/lists/
 
Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: doveadm backup empties the remote host? SERIOUSLY???

2024-04-27 Thread Nils via dovecot

On 4/26/24 14:04, Aki Tuomi wrote:
We have migration guide, see 
https://doc.dovecot.org/admin_manual/migrating_mailboxes/

Aki


regarding this guide:
I am supposed to set up doveadm service on the old server and then call
"doveadm backup -Ru username tcp:host:port"
on the new server? So the reason that doveadm deleted everything 
yesterday was that I forgot the -R option?


"The doveadm backup command forces the destination to look exactly like 
the source, deleting mails and mailboxes if necessary."
Why did doveadm backup create (empty) mailboxes on the new server, when 
I mistakably used it in the wrong direction?


-

Had to switch of the email server for over 10 hours yesterday. any 
messages might not have reached me. is there a mailman archive?

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


doveadm backup empties the remote host? SERIOUSLY???

2024-04-26 Thread Christopher X. Candreva via dovecot
This is the magic incantation I use:

#> doveadm -o mail_fsync=never -R -u u...@foo.bar imapc:
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


RE: doveadm backup empties the remote host? SERIOUSLY???

2024-04-26 Thread Marc via dovecot



> 
> Sure it's my own fault - no discussion about that, but seriously? How
> dangerously unintuitive it that?
> 

I don't really get what is going on with remote host. How is a host name even 
relevant other than setting up the initial connection. I don't even see it in 
my storage mail files.
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


Re: doveadm backup empties the remote host? SERIOUSLY???

2024-04-26 Thread Aki Tuomi via dovecot
 
 On 26/04/2024 14:46 EEST Nils via dovecot 
 wrote:
  
  
 Sure it's my own fault - no discussion about that, but seriously? How
 dangerously unintuitive it that?
  
 I found it when I was searching for a good practice to migrate a mail
 server with rsync and I mistakably assumed it works in the same
 direction as rsync.
  
 Luckily i have a backup from all mails except today's.
  
 Please, someone tell me what's the best procedure to migrate dovecot.
 ___
 dovecot mailing list -- dovecot@dovecot.org
 To unsubscribe send an email to dovecot-le...@dovecot.org
 
We have migration guide, see https://doc.dovecot.org/admin_manual/
migrating_mailboxes/
 
Aki
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org


doveadm backup empties the remote host? SERIOUSLY???

2024-04-26 Thread Nils via dovecot
Sure it's my own fault - no discussion about that, but seriously? How 
dangerously unintuitive it that?


I found it when I was searching for a good practice to migrate a mail 
server with rsync and I mistakably assumed it works in the same 
direction as rsync.


Luckily i have a backup from all mails except today's.

Please, someone tell me what's the best procedure to migrate dovecot.
___
dovecot mailing list -- dovecot@dovecot.org
To unsubscribe send an email to dovecot-le...@dovecot.org