How to backup data in Zabbix automaticaly useable way ?
It is nightmare for Zabbix administrator to miss some data in Zabbix. If somebody changes data in template or host, it is hard process to get them back. It is possible to use database backup but it is very slow process. And even more, it is not tuneable. So you have to recover everything or nothing.
Zaf is the solution
Even if Zaf means "Zabbix agent framework", it has one big advanatage. It can communicate directly with Zabbix API and get informations from there. It is side effect of Zaf (primary mission of this feature will be discused in another article) but it is useable for backup. Result of Zaf backup will be directory with XML files. Each file belongs to exported host and exported template. This is very flexible and useable way. Any time you can look into directory, get template or host from backup and apply it back to Zabbix. You can even backup more sophisticaly if you use more directories per days, weeks or months. And, what is great, Zaf has no dependencies at all. It needs only curl. Everything is shell based script. Example of backup structure:
ls /var/backups/zabbix-xml-hosts/
zb-206.xml
zb-209.xml
zc-003.xml
...
ls /var/backups/zabbix-xml-templates/
Template App ICMP ping.xml
Template App ISC DHCP.xml
Template_App_MySQL.xml
...
More instructions at my pages
It is nightmare for Zabbix administrator to miss some data in Zabbix. If somebody changes data in template or host, it is hard process to get them back. It is possible to use database backup but it is very slow process. And even more, it is not tuneable. So you have to recover everything or nothing.
Zaf is the solution
Even if Zaf means "Zabbix agent framework", it has one big advanatage. It can communicate directly with Zabbix API and get informations from there. It is side effect of Zaf (primary mission of this feature will be discused in another article) but it is useable for backup. Result of Zaf backup will be directory with XML files. Each file belongs to exported host and exported template. This is very flexible and useable way. Any time you can look into directory, get template or host from backup and apply it back to Zabbix. You can even backup more sophisticaly if you use more directories per days, weeks or months. And, what is great, Zaf has no dependencies at all. It needs only curl. Everything is shell based script. Example of backup structure:
ls /var/backups/zabbix-xml-hosts/
zb-206.xml
zb-209.xml
zc-003.xml
...
ls /var/backups/zabbix-xml-templates/
Template App ICMP ping.xml
Template App ISC DHCP.xml
Template_App_MySQL.xml
...
More instructions at my pages