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?