28 Apr
2022
28 Apr
'22
8:48 a.m.
On 28/04/2022 08:33 Shawn Heisey <elyograg@elyograg.org> wrote:
On 4/27/2022 11:27 PM, Aki Tuomi wrote:
There is no reason to delete the dovecot files after recovery. You can run
doveadm force-resyncto ensure everything is synced. Removing the files just cause more problems than benefit usually.Thanks for that information! Very helpful for future fiddling.
Does that resync command also maybe force a full FTS reindex? I'm using fts_solr. The way that I currently manage a full reindex is with the following shell script:
#!/bin/sh DOVECOT_SOLR_URL_BASE="http://localhost:8983/solr/dovecot" MAIL_ROOT=/var/vmail
DO NOT MODIFY BELOW
WITHOUT GOOD REASON
DEL_ALL_QUERY_XML="<delete><query>*:*</query></delete>" service dovecot stop curl
"${DOVECOT_SOLR_URL_BASE}/update?commit=true&optimize=true"
-H "Content-Type: text/xml"
--data-binary "${DEL_ALL_QUERY_XML}" find ${MAIL_ROOT} -name "dovecot.*index*" -print0 | xargs -0 rm -f service dovecot start doveadm index -A -q '*'-s
drop fts data
doveadm fts rescan -u user
rebuild index
doveadm index -u user "*"
Aki