Migrating Zabbix Server to Another Server

from CentOS to Debian

Recently, Migrating Zabbix Server to another server has become very relevant due to various changes in operating systems.

Preparing to migrate Zabbix Server

Zabbix Documentation

Migration of Zabbix Server

Stop the zabbix service:

systemctl stop zabbix-server zabbix-agent

Doing a database dump.

mysqldump -u root --single-transaction --quick --routines zabbix > /backup/zabbix_mysql.sql | gzip -c > /tmp/zabbix_mysql.sql.gz

Transfer to the new server.

scp /tmp/zabbix_mysql.sql.gz root@10.10.10.9:/tmp

Unpack the database archive:

gunzip /tmp/zabbix.sql.gz

Open the MySQL console and restore the dump to the Zabbix database:

mysql -u root zabbix < /tmp/zabbix_mysql.sql