On October 20, 2016 at 5:11 PM Konstantin Khomoutov flatworm@users.sourceforge.net wrote:
On Thu, 20 Oct 2016 16:57:45 +0300 (EEST) Aki Tuomi aki.tuomi@dovecot.fi wrote:
[...]
Alternatively you can use
dsync
to perform backup with a native Dovecot tool. It's able to sync mailboxes of any Dovecot user -- including synchronizing a mailbox to an empty (yet) spool. You'll need to do a bit of shell scripting which would spin around callingdoveadm user *
and feeding its output to something likewhile read user; do
dest="/var/backup/dovecot/$user"; mkdir -p "$dest" && chown vmail:vmail "$dest"
&& chmod 0755 "$dest" dsync -u "$user" backup "maildir:$dest"
doneNote that you will only need this if you don't want to shut down Dovecot to copy its mail spool out.
You can also use doveadm backup -A maildir:%u/
Looks like
doveadm
of my Dovecot 2.2 (Debian 8.0 Jessie) does not support the "backup" subcommand. Is it a past-2.2 addition?
We aren't past 2.2 yet. But it should work with dsync -A backup as well I guess.
Aki