File: kopano-dbadm.8

package info (click to toggle)
kopanocore 8.7.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 15,400 kB
  • sloc: cpp: 175,422; python: 24,623; perl: 7,319; php: 6,056; sh: 2,172; makefile: 1,294; xml: 45; ansic: 1
file content (97 lines) | stat: -rw-r--r-- 3,927 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
.TH kopano\-dbadm 8 "2018-04-11" "Kopano 8" "Kopano Groupware Core reference"
.SH Name
kopano\-dbadm \(em database administration utility
.SH Synopsis
\fBkopano\-dbadm\fP [\fB\-c\fP \fIserver.cfg\fP] \fIaction\fP...
.SH Description
.PP
This tool is for special surgical tasks on the Kopano SQL database.
\fBkopano\-server ought to be stopped when running this utility\fP, unless
otherwise noted. You should make a database backup first.
.SH Options
.TP
\fB\-c\fP \fIserver.cfg\fP
By default, kopano\-dbadm will read /etc/kopano/server.cfg for MySQL
connection parameters, but an alternate file may be specified.
.SH Actions
.SS k\-1216
.PP
This is an alias for the combination of: index\-tags, np\-remove\-highid,
np\-remove\-unused, np\-repair\-dups, np\-defrag, rm\-helper\-index. It may be
used to address the K-1216 issue that kopano\-server(8) may report when
performing a schema update. If the tag indices already exist, harmless warnings
will show, but the indices will be used and left as-is after the k\-1216 action
is done.
.SS kc\-1375
.PP
Deletes all cached IMAP Envelopes that show signs of having address lists with
excess parentheses. This action can be executed while kopano\-server is active.
If you do so, also execute `kopano\-srvadm \-\-clear\-cache=cell` afterwards.
.SS np\-defrag
.PP
Compact 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).
.SS np\-remove\-highid
.PP
Remove 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 needlessy.
.SS np\-remove\-unused
.PP
Remove all named property mappings that have zero use counts in other tables.
.SS np\-remove\-xh
.PP
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. np\-defrag should be run afterwards.
.SS np\-repair\-dups
.PP
Repairs duplicate named properties (only IDs below or equal to 31485).
.SS np\-stat
.PP
Show statistics for the namedproperties table. This action can be executed
while kopano\-server is active.
.SS index\-tags
.PP
Create helper indices for the "tag" columns. This action can be executed while
kopano\-server is active.
.SS rm\-helper\-index
.PP
Remove helper indices again. This action can be executed while kopano\-server
is active.
.SS usmp
.PP
This is an alias for the combination of: usmp\-shrink\-columns, usmp\-charset.
.SS usmp-charset
.PP
Convert the database to utf8mb4 to support the Unicode Supplemental Plane,
better known for Emoji characters.
.SS usmp-shrink-columns
.PP
A number of table columns will be shrunk to accommodate certain MySQL index
limits.
.SH Performance
.PP
Totally depends on the amount of data that needs to be moved. MySQL also seems
to process the requests single-threadedly.
.PP
An approximate row count of a table can be retrieved with \fBSHOW TABLE STATUS
LIKE "\fP\fIproperties\fP\fB"\fP. For an exact count, use \fBSELECT COUNT(*)
FROM `\fP\fIproperties\fP\fB`\fP.
.SS k\-1216
.PP
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.
.SS usmp-charset
.PP
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.
.SH See also
.PP
\fBkopano\-server.cfg\fP(5)