I don't have a working example because I do my dsync backups on the local machine with output to shared NFS storage that is accessible to both my primary and backup systems. No ssh required or remote connection required. That is provided by NFS.
This excerpt of my backup script runs dsync in a loop where 'USERS' is populated with email account names to be backed up. The backup target location is on separate storage. If you can't figure out the doveadm sync to another server you could NFS share a file system from your secondary system to your primary and do something similar. for user in ${USERS}; do dsync -u ${user} backup maildir:/home/${user}/backup/mailboxes done > -----Original Message----- > From: Kent Borg <kentborg-dove...@borg.org> > Sent: Thursday, January 23, 2025 5:22 PM > To: cdm...@yahoo.com; dovecot@dovecot.org > Subject: Re: newbie dsync problems > > On 1/23/25 1:41 PM, cdm...@yahoo.com wrote: > > In your working example you are connecting as root but in your dsync > example your user is remoteprefix:root. Try removing the "remoteprefix:" > which is being treated as part of the user name. > > > If I take off the "remoteprefix" it logs in, but it doesn't send the > user to the other end, the wrapper script on mail.borg.org gets "VERSION > dsync 3 5" as the parameter. > > > root@la:/etc/dovecot# doveadm sync -u kentborg -1 ssh -i > > /root/.ssh/id_rsa_rc.borg.org.dsync r...@mail.borg.org > > Error: Extraneous arguments found: 3 5 > > doveadm(kentborg)<1052944><mEMeJ8i9kmcQERAAA8+vgQ>: Error: > > read(remote) failed: EOF (version not received) > > doveadm(kentborg)<1052944><mEMeJ8i9kmcQERAAA8+vgQ>: Error: > Remote > > command returned error 64: ssh -i /root/.ssh/id_rsa_rc.borg.org.dsync > > r...@mail.borg.org dsync-server > > root@la:/etc/dovecot# doveadm sync -u kentborg -1 ssh -i > > /root/.ssh/id_rsa_rc.borg.org.dsync remoteprefix:r...@mail.borg.org > > remoteprefix:r...@mail.borg.org's password: > > According to the man page, that should be the destination: > > > ARGUMENTS > > destination > > This argument specifies the synchronized destination. > > It can be > > one of: > > > > location > > Same as mail_location setting, e.g. maildir:~/Maildir > > > > remote:login@host > > Uses dsync_remote_cmd setting to connect to the > > remote > > host (usually via ssh) > > > > remoteprefix:login@host > > This is the same as remote, except > > "user@domain\n" is > > sent before dsync protocol starts. This allows > > impleā > > menting a trusted wrapper script that runs > > doveadm > > dsync-server by reading the username from the > > first line. > > > > tcp:host[:port] > > Connects to remote doveadm server via TCP. The > > default > > port is specified by doveadm_port setting. > > > > tcps:host[:port] > > This is the same as tcp, but with SSL. > > > > command [arg1 [, arg2, ...]] > > Runs a local command that connects its standard > > input & > > output to a dsync server. > > > One of the examples on the man page is: > > > doveadm sync -u usern...@example.com ssh -i id_dsa.dovecot \ > > mailu...@example.com doveadm dsync-server -u > > usern...@example.com > > Which I don't understand. What is "mailu...@example.com"? What are the > two parameters and the option after that? > > > Their simpler example: > > > doveadm sync -u usern...@example.com remote:server- > replica.example.com > Makes much more sense, but I can't find anything based on that example > works. > > Does "doveadm sync" maybe not work in version 2.3.19.1? > > > root@la:/etc/dovecot# dovecot --version > > 2.3.19.1 (9b53102964) > > Thanks, > > -kb, the Kent who would love to see some working "doveadm sync" examples. > _______________________________________________ dovecot mailing list -- dovecot@dovecot.org To unsubscribe send an email to dovecot-le...@dovecot.org