1.停止相关服务,避免写入数据
service zabbix_server stop
service httpd stop
******************************************
$ sudo /etc/init.d/zabbix-server stop
$ sudo /etc/init.d/apache2 stop
*********************************************
2.执行备份数据库脚本
sh dbbackup.sh
3.清空历史数据
$ mysql -uroot -p
use zabbix;
truncate table history;
optimize table history;
truncate table history_uint;
optimize table history_uint;
truncate table trends;
optimize table trends;
truncate table trends_uint;
optimize table trends_uint;
4. 启动相关服务
service zabbix_server start
service httpd start