kopano-dbadm(8)
π NAME
kopano-dbadm β bestie, this is the database administration utility. It's the manual page, and it lives in the Kopano Groupware Core reference section. π
β¨ SYNOPSIS β¨
kopano-dbadm [-c server.cfg] action...
π¦ DESCRIPTION π¦
Okay so, this tool? It's for special surgical tasks on the Kopano SQL database. Not your everyday vibe β we're talking precision operations here, like a scalpel but make it SQL. π₯
Real talk: kopano-server ought to be stopped while you're running this utility, unless otherwise noted. And you should make a database backup first. No cap. Do the backup. π
πΈ OPTIONS πΈ
-c server.cfgβ by default,kopano-dbadmreads/etc/kopano/server.cfgfor its MySQL connection parameters, but likeβ¦ you can point it at a different file if you want. Alternate file, alternate vibe. π«
π ACTIONS π
π k-1216
This one is an alias for the combination of: index-tags, np-remove-highid, np-remove-unused, np-repair-dups, np-defrag, rm-helper-index. So instead of typing all of those, you just say k-1216 and it's giving efficiency. β¨
It may be used to address the K-1216 issue that kopano-server(8) may report when performing a schema update. And if the tag indices already exist? You'll get harmless warnings β but the indices will be used and left as-is after the k-1216 action is done. Not a problem, just a heads-up. π«Ά
π kc-1375
Deletes all cached IMAP Envelopes that show signs of having address lists with excess parentheses. (The audacity of those parentheses, honestly. π)
This action can be executed while kopano-server is active. But if you do, also execute kopano-srvadm --clear-cache=cell afterwards. Don't skip that part bestie. π
π kc-1444
Synchronizes all PR_MESSAGE_FLAGS values from the "properties" table to the "tproperties" table. Glow-up for your flags. β¨
This action can be executed while kopano-server is active. If you do, execute kopano-srvadm --clear-cache=cell afterwards.
π§ np-defrag
Compacts the ID space in the namedproperties table and lowers the AUTO_INCREMENT value β thereby making IDs actually usable after a remove operation (such as np-remove-xh). Defrag is self-care. πΈ
β np-remove-highid
Removes all named property mappings with internal ID higher than 31485. As Kopano/Zarafa MAPI clients cannot handle these IDs anyway, the IDs are never used to store any data and only occupy the ID space needlessly. So they're just sitting there, taking up room, doing nothing. Not very main character of them. π
π np-remove-unused
Removes all named property mappings that have zero use counts in other tables. Unused? Uninvited. πͺβ¨
π np-remove-xh
kopano-dagent(8) used to index all X-Headers from Internet e-mails by default, but administrators may not have needed this information in the first place. π¬
By using np-remove-xh, all named properties whose name starts with "X-" and have GUID=PS_INTERNET_HEADERS are removed.
Heads up: np-defrag should be run afterwards.
π¦ np-repair-dups
Repairs duplicate named properties β and just so you know, this is only IDs below or equal to 31485. π
π np-stat
Shows statistics for the namedproperties table. Numbers! Data! It's giving insight. β¨
This action can be executed while kopano-server is active. Slay.
π index-tags
Creates helper indices for the "tag" columns.
This action can be executed while kopano-server is active. π«Ά
π rm-helper-index
Removes those helper indices again. We love a reversible moment.
This action can be executed while kopano-server is active.
π§ usmp
This one is an alias for the combination of: usmp-shrink-columns, usmp-charset. Two for one, we love to see it. π
π usmp-charset
Converts the database to utf8mb4 to support the Unicode Supplemental Plane, better known for Emoji characters. πβ¨ THE EMOJI ACTION. This is literally the most iconic one on the list and I will not be taking questions.
π usmp-shrink-columns
A number of table columns will be shrunk to accommodate certain MySQL index limits. Shrink era. π
π₯ PERFORMANCE π₯
Totally depends on the amount of data that needs to be moved. MySQL also seems to process the requests single-threadedly. (Not the multitasking queen we hoped for, ngl. π)
An approximate row count of a table can be retrieved with:
SHOW TABLE STATUS LIKE "properties"
For an exact count, use:
SELECT COUNT(*) FROM `properties`
β k-1216
An i7-3930K completed a naturally-evolved DB (4.96 GiB, properties: 12.94M rows, tproperties: 9.65M rows, mvproperties: 9.9K rows, indexedproperties: 3.24M rows, singleinstances: 188K rows, names: 2988) using the "k-1216" command combo within 2 minutes and the "np-remove-xh, np-defrag" combo within 5 1/2 minutes. Speedy. ποΈβ¨
π usmp-charset
An AMD Ryzen 1700X completed the "usmp-charset" transformation on a DB (6.3 GiB, properties: 16.43M rows, tproperties: 12.25M rows, mvproperties: 10.2K rows, indexedproperties: 410K rows, singleinstances: 258K rows) in 7 minutes. Emoji transformation speedrun any%. π€
π SEE ALSO π
Okay bestie, that's the whole page. This one shipped with Kopano 8, dated 2018-04-11 β so yeah, it's vintage but it still eats. Go back up your database now fr fr. π«Άβ¨π
π¦ where this page comes from
- ubuntu jammy: kopano-utils 8.7.0-7.1ubuntu10 Β· AGPL-3.0-only
- ubuntu jammy: kopano-utils 8.7.0-7.1ubuntu10.1 Β· AGPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms