feat: rebuild thunderbird's global db

This commit is contained in:
Michele Cereda
2023-07-30 01:03:57 +02:00
parent 6c3535ebc9
commit b31d98278a

View File

@@ -7,6 +7,8 @@
1. [Profile manager](#profile-manager)
1. [Backing up profiles](#backing-up-profiles)
1. [Restoring profiles from backups](#restoring-profiles-from-backups)
1. [Troubleshooting](#troubleshooting)
1. [Rebuild the Global Database for a Profile](#rebuild-the-global-database-for-a-profile)
1. [Sources](#sources)
## TL;DR
@@ -60,20 +62,57 @@ ${HOME}/Applications/Thunderbird.app/Contents/MacOS/thunderbird-bin -P
Overwrite existing files of the same name.
1. Open up the `profiles.ini` file in the application data folder in a text editor.
```sh
vim "${HOME}/Library/Thunderbird/profiles.ini"
vim "${THUNDERBIRD_DATA_DIR}/profiles.ini"
```
1. Check the `Path=` line for the profile is correct.
1. Start Thunderbird.
## Troubleshooting
### Rebuild the Global Database for a Profile
The Global Database is the indexing system that enables Thunderbird to search messages.<br/>
Rebuilding the Global Database re-indexes messages and address book cards. Newsgroup messages are **not** indexed.
Reasons for rebuilding the Global Database include:
- The database may have been corrupted.
- The search index may not be functioning correctly, such as displaying blank results or performing poorly.
- The database is too big and needs to be reduced in size.
- The Global Database file becomes fragmented, which reduces index performance.
Rebuilding the database will **not** automatically reduce the size of the index.<br/>
It will only shrink if there are fewer messages to index since it was last updated, which can be accomplished by deleting messages or disabling message sync for an account or folder.
Steps to rebuild the Global Database:
1. Quit Thunderbird.
1. Delete the `global-messages-db.sqlite` file in the Thunderbird Profile you want to rebuild the index for.
```sh
rm "${THUNDERBIRD_DATA_DIR}/Profiles/we12yhij.default/global-messages-db.sqlite"
```
1. Start Thunderbird.
The re-indexing process will start automatically.<br/>
Depending on the number of messages, it might take some time for the indexing to complete; performance might be affected, and the search will return only partial results or even no results until the indexing is complete.
The indexing progress can be monitored through _Tools_ > _Activity Manager_.
## Sources
- [profile manager create and remove thunderbird profiles]
- [Profile manager - create and remove thunderbird profiles]
- [Profiles - Where Thunderbird stores your messages and other user data]
- [Rebuilding the global database]
- [Arch Wiki]
<!--
References
-->
<!-- Upstream -->
[profile manager create and remove thunderbird profiles]: https://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-thunderbird-profiles#
[profile manager - create and remove thunderbird profiles]: https://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-thunderbird-profiles#
[profiles - where thunderbird stores your messages and other user data]: https://support.mozilla.org/en-US/kb/profiles-where-thunderbird-stores-user-data#
[rebuilding the global database]: https://support.mozilla.org/en-US/kb/rebuilding-global-database#
<!-- Others -->
[arch wiki]: https://wiki.archlinux.org/title/thunderbird