doveadm backup to local drive

Terry Barnum terrydop at gmail.com
Mon Feb 15 19:43:00 UTC 2016


I'm trying to get doveadm to backup all users to a local drive without any luck.

$ sudo doveadm backup -A /Volumes/mail_bak/mailstore_backup/
Error: User listing returned failure
doveadm: Error: Failed to iterate through some users

The doveadm-backup man page has the instruction to make sure the iterate query matches the database layout but I'm not sure what that means.

If the user_query in dovecot-sql.conf.ext looks like this, what should the iterate_query look like?

user_query = \
  SELECT '/opt/local/virtual/%d/%n/mail' as home, \
  'maildir:/opt/local/virtual/%d/%n/mail' as mail, 501 as uid, \
  501 as gid, concat("*:storage=", quota) AS quota \
  FROM mailbox WHERE username = "%u" AND active = "1"

# Query to get a list of all usernames.
iterate_query = SELECT username AS user FROM users

Thanks,
-Terry

Terry Barnum
digital OutPost
Carlsbad, CA

http://www.dop.com
800/464-6434



More information about the dovecot mailing list