Re: Moving messages between servers with different configurations

2019-01-22 Thread Sami Ketola
Hi,

not easily. You can always limit dsync to a single folder with -m folder, but 
then again it's designed to make 1:1 copy so you would need to rename the 
synced folder afterwards.

Sami

> On 22 Jan 2019, at 17.55, Marc Roos  wrote:
> 
> 
> This pulls over the whole test mailbox, but I need it to be stored in a 
> different mailbox, of course that is now possible to move from the local 
> test to the local INBOX/test2. But then I might aswell scp the mbox in 
> the first place. 
> 
> Should we conclude that it is not possible with a single doveadm command 
> to move messages from RemoteServerA/usertest/mailboxA/messagesof2017 to 
> LocalServerB/usertest/mailboxX/ ?
> 
> [@~]# doveadm mailbox list -u testuser
> Drafts
> Junk
> Trash
> INBOX/test2
> INBOX/test3
> Sent
> Archive
> Archive/Archive
> Archive/2019old
> INBOX
> [@~]# doveadm backup -u testuser -R -m test tcp:192.168.10.43:542
> [@~]# doveadm mailbox list -u testuser
> Drafts
> Junk
> Trash
> INBOX/test2
> INBOX/test3
> Sent
> test   <--- new!
> Archive
> Archive/Archive
> Archive/2019old
> INBOX
> 
>> try running this on the NEW dovecot server:
>> 
>> doveadm backup -u uid -R tcp:192.168.10.43:542
>> 
>> to pull the messages from old server.
>> 
>>> I feel a bit like an idiot, but I have been trying with copy, so I 
> do 
>>> not lose any message when testing. But I can't get them to copy. I 
> do 
>>> indeed have same uid and gid.
>>> 
>>> 
>>> [@~]# doveadm mailbox status -S 192.168.10.43:542 -u testuser -t 
>>> messages test
>>> messages=43
>>> [@~]# doveadm mailbox status -u testuser -t messages INBOX/test2
>>> messages=16
>>> 
>>> [@~]# doveadm -v copy -S 192.168.10.43:542 -u testuser INBOX/test2 
>>> mailbox test
>>> [@~]#
>>> 
>>> [@~]# doveadm mailbox status -S 192.168.10.43:542 -u testuser -t 
>>> messages test
>>> messages=43
>>> [@~]# doveadm mailbox status -u testuser -t messages INBOX/test2
>>> messages=16 
>>> 
>>> Also tried with
>>> doveadm -v copy -S 192.168.10.43:542 -u testuser INBOX/test2 user 
>>> testuser mailbox test
>>> 
>>> 
>>> 
 doveadm [-Dv] move [-S socket_path] -u user  destination [user 
>>> source_user] search_query
 
 Moving all mails from mailbox INBOX/test on serverA to mailbox
 Archive/2017 on local serverB.
 + destination Archive/2017 must exist
 + Limitation: source_user and testuser must share the same UID and 
>>> GID
 
 doveadm move -S x.x.x.x:x -u testuserAtServerB
 Archive/2017 user source_userAtServerA mailbox INBOX/test ALL
 
 
> I wanted to move messages from a mbox mailbox on server A to mdbox
> on 
> server B. I thought I could do this by connecting to the remote
> server 
> with "doveadm move -S x.x.x.x:x -u testuser Archive/2017 mailbox 
> INBOX/test" but I guess this will only allow and move messages 
> internally on server B?
> Should I use dsync, or is there another way to move the messages?
> 



RE: Moving messages between servers with different configurations

2019-01-22 Thread Marc Roos
 
This pulls over the whole test mailbox, but I need it to be stored in a 
different mailbox, of course that is now possible to move from the local 
test to the local INBOX/test2. But then I might aswell scp the mbox in 
the first place. 

Should we conclude that it is not possible with a single doveadm command 
to move messages from RemoteServerA/usertest/mailboxA/messagesof2017 to 
LocalServerB/usertest/mailboxX/ ?

[@~]# doveadm mailbox list -u testuser
Drafts
Junk
Trash
INBOX/test2
INBOX/test3
Sent
Archive
Archive/Archive
Archive/2019old
INBOX
[@~]# doveadm backup -u testuser -R -m test tcp:192.168.10.43:542
[@~]# doveadm mailbox list -u testuser
Drafts
Junk
Trash
INBOX/test2
INBOX/test3
Sent
test   <--- new!
Archive
Archive/Archive
Archive/2019old
INBOX

 >try running this on the NEW dovecot server:
 >
 >doveadm backup -u uid -R tcp:192.168.10.43:542
 >
 >to pull the messages from old server.
 >
 >> I feel a bit like an idiot, but I have been trying with copy, so I 
do 
 >> not lose any message when testing. But I can't get them to copy. I 
do 
 >> indeed have same uid and gid.
 >> 
 >> 
 >> [@~]# doveadm mailbox status -S 192.168.10.43:542 -u testuser -t 
 >> messages test
 >> messages=43
 >> [@~]# doveadm mailbox status -u testuser -t messages INBOX/test2
 >> messages=16
 >> 
 >> [@~]# doveadm -v copy -S 192.168.10.43:542 -u testuser INBOX/test2 
 >> mailbox test
 >> [@~]#
 >> 
 >> [@~]# doveadm mailbox status -S 192.168.10.43:542 -u testuser -t 
 >> messages test
 >> messages=43
 >> [@~]# doveadm mailbox status -u testuser -t messages INBOX/test2
 >> messages=16 
 >> 
 >> Also tried with
 >> doveadm -v copy -S 192.168.10.43:542 -u testuser INBOX/test2 user 
 >> testuser mailbox test
 >> 
 >> 
 >> 
 >>> doveadm [-Dv] move [-S socket_path] -u user  destination [user 
 >> source_user] search_query
 >>> 
 >>> Moving all mails from mailbox INBOX/test on serverA to mailbox
 >>> Archive/2017 on local serverB.
 >>> + destination Archive/2017 must exist
 >>> + Limitation: source_user and testuser must share the same UID and 
 >> GID
 >>> 
 >>> doveadm move -S x.x.x.x:x -u testuserAtServerB
 >>> Archive/2017 user source_userAtServerA mailbox INBOX/test ALL
 >>> 
 >>> 
  I wanted to move messages from a mbox mailbox on server A to mdbox
  on 
  server B. I thought I could do this by connecting to the remote
  server 
  with "doveadm move -S x.x.x.x:x -u testuser Archive/2017 mailbox 
  INBOX/test" but I guess this will only allow and move messages 
  internally on server B?
  Should I use dsync, or is there another way to move the messages?
  


Re: Moving messages between servers with different configurations

2019-01-22 Thread Sami Ketola
Hi,

try running this on the NEW dovecot server:

doveadm backup -u uid -R tcp:192.168.10.43:542

to pull the messages from old server.

Sami


> On 22 Jan 2019, at 16.52, Marc Roos  wrote:
> 
> 
> 
> Hi Martin,
> 
> I feel a bit like an idiot, but I have been trying with copy, so I do 
> not lose any message when testing. But I can't get them to copy. I do 
> indeed have same uid and gid.
> 
> 
> [@~]# doveadm mailbox status -S 192.168.10.43:542 -u testuser -t 
> messages test
> messages=43
> [@~]# doveadm mailbox status -u testuser -t messages INBOX/test2
> messages=16
> 
> [@~]# doveadm -v copy -S 192.168.10.43:542 -u testuser INBOX/test2 
> mailbox test
> [@~]#
> 
> [@~]# doveadm mailbox status -S 192.168.10.43:542 -u testuser -t 
> messages test
> messages=43
> [@~]# doveadm mailbox status -u testuser -t messages INBOX/test2
> messages=16 
> 
> Also tried with
> doveadm -v copy -S 192.168.10.43:542 -u testuser INBOX/test2 user 
> testuser mailbox test
> 
> 
> 
>> doveadm [-Dv] move [-S socket_path] -u user  destination [user 
> source_user] search_query
>> 
>> Moving all mails from mailbox INBOX/test on serverA to mailbox
>> Archive/2017 on local serverB.
>> + destination Archive/2017 must exist
>> + Limitation: source_user and testuser must share the same UID and 
> GID
>> 
>> doveadm move -S x.x.x.x:x -u testuserAtServerB
>> Archive/2017 user source_userAtServerA mailbox INBOX/test ALL
>> 
>> 
>>> I wanted to move messages from a mbox mailbox on server A to mdbox
>>> on 
>>> server B. I thought I could do this by connecting to the remote
>>> server 
>>> with "doveadm move -S x.x.x.x:x -u testuser Archive/2017 mailbox 
>>> INBOX/test" but I guess this will only allow and move messages 
>>> internally on server B?
>>> Should I use dsync, or is there another way to move the messages?
>>> 
>>> 
>>> 
> 



RE: Moving messages between servers with different configurations

2019-01-22 Thread Marc Roos



Hi Martin,

I feel a bit like an idiot, but I have been trying with copy, so I do 
not lose any message when testing. But I can't get them to copy. I do 
indeed have same uid and gid.


[@~]# doveadm mailbox status -S 192.168.10.43:542 -u testuser -t 
messages test
messages=43
[@~]# doveadm mailbox status -u testuser -t messages INBOX/test2
messages=16

[@~]# doveadm -v copy -S 192.168.10.43:542 -u testuser INBOX/test2 
mailbox test
[@~]#

[@~]# doveadm mailbox status -S 192.168.10.43:542 -u testuser -t 
messages test
messages=43
[@~]# doveadm mailbox status -u testuser -t messages INBOX/test2
messages=16 

Also tried with
doveadm -v copy -S 192.168.10.43:542 -u testuser INBOX/test2 user 
testuser mailbox test



 >doveadm [-Dv] move [-S socket_path] -u user  destination [user 
source_user] search_query
 >
 >Moving all mails from mailbox INBOX/test on serverA to mailbox
 >Archive/2017 on local serverB.
 > + destination Archive/2017 must exist
 > + Limitation: source_user and testuser must share the same UID and 
GID
 >
 >doveadm move -S x.x.x.x:x -u testuserAtServerB
 > Archive/2017 user source_userAtServerA mailbox INBOX/test ALL
 >
 >
 >> I wanted to move messages from a mbox mailbox on server A to mdbox
 >> on 
 >> server B. I thought I could do this by connecting to the remote
 >> server 
 >> with "doveadm move -S x.x.x.x:x -u testuser Archive/2017 mailbox 
 >> INBOX/test" but I guess this will only allow and move messages 
 >> internally on server B?
 >> Should I use dsync, or is there another way to move the messages?
 >> 
 >> 
 >> 



Re: Moving messages between servers with different configurations

2019-01-22 Thread Martin Johannes Dauser
Hi,

doveadm [-Dv] move [-S socket_path] -u user
 destination [user
source_user] search_query

Moving all mails from mailbox INBOX/test on serverA to mailbox
Archive/2017 on local serverB.
 + destination Archive/2017 must exist
 + Limitation: source_user and testuser must share the same UID and GID

doveadm move -S x.x.x.x:x -u testuserAtServerB 
 Archive/2017 user source_userAtServerA mailbox INBOX/test ALL


Greetings
Martin Johannes Dauser


On Mon, 2019-01-21 at 23:14 +0100, Marc Roos wrote:
> I wanted to move messages from a mbox mailbox on server A to mdbox
> on 
> server B. I thought I could do this by connecting to the remote
> server 
> with "doveadm move -S x.x.x.x:x -u testuser Archive/2017 mailbox 
> INBOX/test" but I guess this will only allow and move messages 
> internally on server B?
> Should I use dsync, or is there another way to move the messages?
> 
> 
> 


Moving messages between servers with different configurations

2019-01-21 Thread Marc Roos


I wanted to move messages from a mbox mailbox on server A to mdbox on 
server B. I thought I could do this by connecting to the remote server 
with "doveadm move -S x.x.x.x:x -u testuser Archive/2017 mailbox 
INBOX/test" but I guess this will only allow and move messages 
internally on server B?
Should I use dsync, or is there another way to move the messages?