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?
* Timo Sirainen <dovecot at dovecot.org>:> 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)Calling the old "dsync" command (symlink) directly should keep the already established command structure. Calling dsync features over doveadm should keep command structure as simple (not complex) as possible. I favour b) for that and rename 'mirror' to 'sync'. 'sync' keeps in line with products such as rsync. People will immediately know what it does. p at rick -- state of mind () http://www.state-of-mind.de Franziskanerstra?e 15 Telefon +49 89 3090 4664 81669 M?nchen Telefax +49 89 3090 4666 Amtsgericht M?nchen Partnerschaftsregister PR 563
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. :)
Apparently Analagous Threads
- dsync should sync sieve-dirs to!
- quota-related crash for doveadm dsync operation
- Panic: file dsync-brain-mailbox.c: line 358 (dsync_brain_sync_mailbox_deinit): assertion failed: (brain->failed || brain->sync_type == DSYNC_BRAIN_SYNC_TYPE_CHANGED)
- Failing: doveadm sync <--remote host--> dsync mirror
- Public folders and dsync replication Dovecot v2.1.7