zabbix4.4 migration backup

Preface: Zabbix migration and backup are mainly operations on database data. The process is very simple, that is, export the existing data of the database, upload it to the new server, and then import it into the existing database.

Steps:

1. Export the database zabbix as zabbix.sql and compress it.
mysqldump -u zabbix -p --default-character-set=UTF8 --opt zabbix > zabbix.sql
Enter password: ********
#时间比较久,看数据库文件的大小。
gzip zabbix.sql 
2. Upload zabbix.sql to /mnt of the new zabbix server, the steps are omitted.
3. Import zabbix.sql into the zabbix database
tar -dv zabbix.sql.gz
zcat /mnt/zabbix.sql.gz | mysql -uzabbix -p zabbix
Enter password: ********
4. Refresh the webpage

The thing to note is that after importing the data, all account information becomes the information of the old server. This point needs to be paid attention to.

Guess you like

Origin blog.csdn.net/qq_43316775/article/details/114001788