Hi, I'm trying to use doveadm backup but I'm having a few issues. When trying locally: `doveadm backup -D -A maildir:/usr/local/backup` It results that no mailbox is separated by user - all seems to sync on the same folder, messing up with the folder structure of the original maildir. When trying remotely: `doveadm backup -D -A -N ssh -i mykey root at myremotebackup.com:/backup doveadmin dsync-server -A` I get this error line for each user: dsync-local(theuser at thedomain.com)<5DNrEXdG1l5tAgAAqsACHw>: Error: read(remote) failed: EOF (version not received) doveadm(theuser at thedomain.com): Fatal: execvp(ssh) failed: No such file or directory I'd be very thankful if someone could help me with this. Best, Francis -- Francis Augusto Medeiros-Logeay Oslo, Norway
Hi, As said below, I am trying to use doveadm backup. I made some progress, but I think I misunderstand some of the basic principles behind the command. My main issue is: when using the -A flag, is there a way to create the backup user on the remote server if it doesn't exist there? Another related question: if backing up on another location on the same computer, using -A doesn't seem to recreate the structure of the original Maildir (for example, /var/mail/%d%n). Is there a way to do that? Best, Francis On 02.06.2020 14:31, Francis Augusto Medeiros-Logeay wrote:> Hi, > > I'm trying to use doveadm backup but I'm having a few issues. > > When trying locally: > > `doveadm backup -D -A maildir:/usr/local/backup` > > It results that no mailbox is separated by user - all seems to sync on > the same folder, messing up with the folder structure of the original > maildir. > > When trying remotely: > > `doveadm backup -D -A -N ssh -i mykey root at myremotebackup.com:/backup > doveadmin dsync-server -A` > > I get this error line for each user: > > dsync-local(theuser at thedomain.com)<5DNrEXdG1l5tAgAAqsACHw>: Error: > read(remote) failed: EOF (version not received) > doveadm(theuser at thedomain.com): Fatal: execvp(ssh) failed: No such > file or directory > > I'd be very thankful if someone could help me with this. > > Best, > > Francis
On Fri, 5 Jun 2020, Francis Augusto Medeiros-Logeay wrote:> Another related question: if backing up on another location on the same > computer, using -A doesn't seem to recreate the structure of the original > Maildir (for example, /var/mail/%d%n). > > Is there a way to do that?If I understand your question correctly (I may be missing context), you can use dsync for that, e.g.: DEST=mdbox:/path/to/$MAILBOX/mdbox dsync -u $MAILBOX backup $DEST where DEST is in "mail location" format (could also be "maildir:/path/to/Maildir") and $MAILBOX is a dovecot (virtual) user. My backup script does this: USERS=$(cat /etc/dovecot/virtual_passwd | cut -d: -f1) for MAILBOX in $USERS; do DEST=mdbox:/encrypted/snap_mail/$MAILBOX/mdbox dsync -v -u $MAILBOX backup $DEST done This runs periodically and does the local "backup". Another server picks that up, also periodically, using rsync, which is the real backup. Cheers.