[Dovecot] doveadm + dsync merging
Attila Nagy
bra at fsn.hu
Thu Dec 29 21:59:35 EET 2011
Hi,
On 12/29/2011 01:35 PM, Timo Sirainen wrote:
> doveadm already supports some nice things, such as being able to remotely launch a doveadm command via TCP socket. It also supports executing a command for all users or to some specific users using a wildcard. dsync could use these features, so I merged dsync and doveadm into same binary for v2.1.
>
> I'll still install "dsync" symlink pointing to "doveadm", and running that way it should be fully backwards compatible with the old dsync binary and its parameters.
>
> I'm mainly now wondering about the command naming for running dsync via doveadm. Any suggestions?
>
> a) Use "doveadm dsync" prefix, and otherwise keep the names same:
>
> dsync mirror -> doveadm dsync mirror
> dsync backup -> doveadm dsync backup
> dsync server -> doveadm dsync server (for running dsync remotely via ssh/etc.)
>
> b) Don't have the dsync prefix:
>
> dsync mirror -> doveadm mirror
> dsync backup -> doveadm backup
> dsync server -> doveadm dsync-server (could be hidden from the doveadm commands list)
>
> c) Either a) or b), but rename "mirror" to "sync" or "dsync" or "replicate"?
>
> d) Something else?
>
Slightly different, but it would be good to have a persistently running
daemon which could operate both in server and client mode.
In server mode it would listen on a TCP socket. In client mode it would
accept source and target information via a control socket. The target IP
address and port would be the daemon's listening socket.
Something like this on the server side:
service dsync {
process_limit = 8
client_limit = 8
inet_listener dsync {
port = 5555
}
Then doveadm sync on the "client) could first connect to the local
server (client), which then connects to the remote service on the
server. Eg.:
doveadm sync [-C <alt char>] [-m <mailbox>] [-u <user>] [-frRv]
mirror <local mail_location> | [<user>@]<host>
where user at host should specify the remote user (mailbox user) and host
should read like 1.1.1.1:1234 (IP address|hostname and port where the
dsync service listens. Or a separate port option to allow easier parsing.
Having the client in a persistent setup would allow faster syncs for
repeated invocations. It would be good to have a simple API to trigger
the sync (a simple text protocol on a unix socket, or something) from
outside programs, to avoid calling doveadm.
The next thing would be to follow dovecot logs and do a sync/async
replication. :)
More information about the dovecot
mailing list