> On 28/04/2022 08:33 Shawn Heisey <elyograg at 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-resync` to 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
On 4/27/2022 11:48 PM, Aki Tuomi wrote:> # drop fts data > doveadm fts rescan -u user > # rebuild index > doveadm index -u user "*"I do full reindexes a lot more often than a typical user would. When I do a reindex, I want it to happen for all users, not one at a time.? Do you have a sequence of commands to accomplish that? I'm part of the Solr project.? I do reindexes for performance testing when I think of something to try, or I want to upgrade Solr.? And also when I think of a change that I want to make to the index config for dovecot.? A full reindex for my install takes less than 10 minutes as I only have about 160K messages total. Not something I would recommend doing frequently when there are millions of messages. Thanks, Shawn
__________ I'm using this dedicated address because personal addresses aren't masked enough at this mail public archive. Public archive administrator should fix this against automated addresses collectors. El 28/4/22 a les 7:48, Aki Tuomi ha escrit:> >> On 28/04/2022 08:33 Shawn Heisey <elyograg at 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-resync` to 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 "*" > > AkiI took note of this: # Repair doveadm -v force-resync -u $User '*' # Drop fts data doveadm -v fts rescan -u $User # Rebuild index doveadm -v index -u $User '*' But I'm not clear about $User it it's for my system "vmail" account that run Dovecot services, or it refers to mail account. In first case, how to specify mail account or maildir tree to act to? Thank you.