Search K
Appearance
Appearance
doveadm-metacache - Utility actions for Dovecot's local metacache storage
doveadm [GLOBAL OPTIONS] metacache command [arguments]
doveadm metacache can be used to run actions that interact with and modify Dovecot's local metacache storage.
There are 4 priorities for index files:
User root indexes (highest priority)
FTS indexes
INBOX and \Junk folder indexes
other folders' indexes (lowest priority)
doveadm [GLOBAL OPTIONS] metacache clean [-A | -u user | -F file | --no-userdb-lookup] [-S socket_path] [-d days] [-p min_priority] [ namespace ]
Cleans old indexes for given users. If the indexes have not been flushed yet this command will fail.
doveadm [GLOBAL OPTIONS] metacache flush [-A | -u user | -F file | --no-userdb-lookup] [-S socket_path] [-p min_priority] [-i] [ namespace ]
Flushes metacache to storage for the given user(s).
doveadm [GLOBAL OPTIONS] metacache flushall [-a metacache_socket_path] [-f userdb_field] [-i] [ user mask ]
Flush all matching users to storage. If no mask is specified, everything is flushed. WARNING: This can be expensive and long operation.
doveadm [GLOBAL OPTIONS] metacache list [-a metacache_socket_path] [ -f userdb_field ] [ user mask ]
List current metacache for matching users. If no mask is specified, lists all users' metacache.
Output will contain
The primary username
Alternative usernames, if configured by returning user_* extra fields from userdb
This corresponds to the metacache_upload_interval setting.
Filesystem device where the user is located in. Filesystems are separately tracked by metacache, although currently support for multiple filesystems doesn't work as well as it could.
Disk space used by index files of this priority in metacache.
UNIX timestamp of when the index files of this priority were last accessed in metacache.
"none" means the index files have no changes done locally since they were downloaded. "unimportant" means there are some changes, but nothing that couldn't be regenerated if the server crashed. "important" means that there are changes that would be lost in case of a server crash. Currently the only important change is flag changes.
Last service that accessed this user. Note that metacache clean and flush operations (via metacache-worker or doveadm) won't update this field.
Currently calculated weight when these indexes are cleaned up. Smaller numbers are cleaned up before larger numbers. Sorting the list output (with |sort -n) by this field will show the order in which the indexes would be cleaned. The cleanup weights are recalculated whenever the indexes are being accessed.
doveadm [GLOBAL OPTIONS] metacache refresh [-A | -u user | -F file | --no-userdb-lookup] [-S socket_path] [ namespace ]
Force refreshing metacache for the given user(s) the next time it's opened. The refresh is done for the user root index and all the folders.
doveadm [GLOBAL OPTIONS] metacache pull [-A | -u user | -F file | --no-userdb-lookup] [-S socket_path] [--latest-only] [--clean] source_backend_host
Pull all metacache for given user(s) from source backend host.
doveadm [GLOBAL OPTIONS] metacache remove [-a metacache_socket_path] user mask
Remove metacache for matching users from metacache process. Mask is required parameter.
doveadm [GLOBAL OPTIONS] metacache rescan [-a metacache_socket_path] [ <root dirs> ]
Triggers an explicit metacache rescan, which makes sure the disk space usage tracked by metacache process matches what really exists on filesystem.
doveadm [GLOBAL OPTIONS] metacache status [-a metacache_socket_path] [ --roots ] [ -b ]
Print statistics about metacache usage.
doveadm [GLOBAL OPTIONS] metacache update userdb [-a metacache_socket_path] username userdb_field value
Update alternative usernames (user_* fields) in doveadm metacache list output.
doveadm [GLOBAL OPTIONS] metacache unpack bundle_file destination_dir
Unpack given bundle from storage to a given directory.
doveadm metacache flush -u user@domain