perform further steps in screen mode:
screen -r
Execute the following SQL query:
create table history_text_tmp like history_text;
Stop backend:
systemctl stop zabbix-server
Execute these queries (this queries will change Zabbix schema, and may cause 1-2 seconds data loss):
rename table history_text to history_text_old;
rename table history_text_tmp to history_text;
Start backend:
systemctl start zabbix-server
Execute the following query (the query will shrink free / reserved space from allocated space for history_text_old table):
optimize table history_text_old;
Stop backend:
systemctl stop zabbix-server
Rename back:
rename table history_text to history_text_tmp;
rename table history_text_old to history_text;
Start backend:
systemctl start zabbix-server
Copy data from temporary table and then delete temporary table:
INSERT INTO history_text SELECT * FROM history_text_tmp;
DROP TABLE history_text_tmp;
No comments:
Post a Comment