Ad Widget

Collapse

Proxy resync with old database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • grattachecca
    Junior Member
    • Mar 2017
    • 8

    #1

    Proxy resync with old database

    Hi,

    let's say I do a MySQL dump today and tomorrow the host where Zabbix server is, die. I restore the dump on another machine and use the same network configuration (IP, hostname, ...).

    Will a proxy send again the 24 hours data that the restored database is missing? Following this post, seems so, can you confirm that? Do I need to increase ProxyLocalBuffer size (in this case to, at least, 24 hours)?
  • grattachecca
    Junior Member
    • Mar 2017
    • 8

    #2
    Anyone can help, please?

    Comment

    • jritmanis
      Junior Member
      • Jul 2023
      • 1

      #3
      At least in v6 I have in lab successfully tested a procedure how to restore/resync data from a proxy after zabbix server DB restore.
      It is important that in proxy config you have ProxyLocalBuffer parameter set to some value - how long to keep the data locally. By default it's disabled, so no data is buffered locally after it's send to server.
      The basic Idea is that it seems that zabbix proxy is storing the last synchronized data id in DB table "ids" and by changing this value, you can tell proxy to sync the data again.

      First step was to stop zabbix-proxy process.
      Then I restored the DB on the server side.
      Then in "proxy_history" table on proxy DB based on clock - how far back I wanted to restore the data I need to get id of the oldest value I wanted to restore. I assume that going far more back than the data already in server DB can cause some issues.
      Then in "ids" table on proxy DB I had to change the nextid value to the value I found for the row where "table_name" is "proxy_history".
      Then start up zabbix-proxy service.
      This procedure is tested only in lab and until now I could not found anything official from zabbix regards this. So use it on your own risk.

      P.S. would be nice if such a restore option would be officially documented and supported from zabbix side as this could be a useful feature for the product.

      Comment

      Working...