DSYNC(1) Dovecot DSYNC(1)
NAME dsync - Dovecot’s synchronization utility
SYNOPSIS dsync [-Dfrv] [-C alt_char] [-m mailbox] [-o setting=value ...] [-u user] command command_arguments
DESCRIPTION dsync is Dovecot’s synchronization utility. It can be used for several different use cases: Two-way synchronization of mailboxes in different servers (via ssh(1)), creating backups of mails to a remote server, and convert mailboxes from/to different mailbox formats.
Any errors are written to stderr.
OPTIONS dsync recognizes the following command line options:
-C alt_char Specifies an alternative mailbox name character. If source and destination mailbox formats are different, it’s possible that on one side there exists a mailbox name that isn’t valid for the other side. These invalid mailbox names are fixed by replacing such invalid characters with the given alt_char. The default is ’_’.
-D Activates debug messages and makes dsync more verbose.
-f Makes dsync run in "full sync" mode rather than "fast sync" mode.
-m mailbox Specifies the mailbox that should be synchronized or from which mails should be converted. The default is to synchronize all respectively convert from all mailboxes.
-o setting=value Overrides the configuration setting from /etc/dovecot/dove- cot.conf and from the userdb with the given value. In order to override multiple settings to -o option may be specified multi- ple times.
-r Specifies that this side of dsync mirror runs read-only. (This probably gets removed when full backup functionality is imple- mented.)
-u user Specifies that the userdb lookup for the given user should be done and used to set up the environment (uid, gid, home, etc.). By default the system user’s current environment will be used.
-v Makes dsync more verbose.
COMMANDS dsync provides the following commands:
convert dsync [dsync options] convert source_mail_location
The convert command is used to convert mailboxes from one mailbox for- mat to another. The -r option is ignored by the convert command.
source_mail_location Specifies the source mail_location, from which the mails should be converted. The syntax for the source_mail_location is: type:path[:modifier ...] For details see: http://wiki.dovecot.org/MailLocation
The destination mail_location is configured in /etc/dove- cot/conf.d/10-mail.conf. The global mail_location setting will be overridden by the mail field from the userdb lookup for user, if it returns one. The mail_location from the userdb and/or from the config- uration file may be overridden by specifying a different mail_location using the -o option.
mirror dsync [dsync options] mirror "ssh [ssh options] [user@]hostname dsync [dsync options]"
EXAMPLE convert Assuming that the mail_location setting in /etc/dove- cot/conf.d/10-mail.conf is set to: mail_location = mdbox:~/mdbox , a logged in system user may convert her/his mails from its Maildir in her/his home directory to the mdbox mailbox format. The user has to execute the command:
dsync convert maildir:~/Maildir
mirror Synchronize user’s mails between local server and imap2 server:
dsync -u firstname.lastname@example.org mirror "ssh imap2.example.com dsync -u email@example.com"
REPORTING BUGS Report bugs, including doveconf -n output, to the Dovecot Mailing List <firstname.lastname@example.org>. Information about reporting bugs is available at: http://dovecot.org/bugreport.html
SEE ALSO doveadm(1), doveconf(1), dovecot(1)
Dovecot v2.0 2010-06-22 DSYNC(1)