Ad Widget

Collapse

Export singel host with history

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Trickels
    Junior Member
    • Oct 2013
    • 3

    #1

    Export singel host with history

    Hi all,

    i want to move our zabbix 1.8.8 server to another 2.0.8 server. The new server is already installed and ready. I only need the data from the old host. But i like to move the hosts one after another!!

    The Item Configuration is no Problem (use the zabbix export host funktion), but
    i need the history/trends data too.

    My idea was to try select the history data direct from the Mysql database.

    Problems are:
    - I dont know exactly which tables i need for the historys (i expect the tables named with "history" and "trends" but not sure. Maybe anyone has the full database schema?)

    - The database patch for zabbix 2.0

    - How to "dump" only some data from some tables (insert skript?)

    Has anyone already experience with that?
  • Trickels
    Junior Member
    • Oct 2013
    • 3

    #2
    Hi again,

    i exportet and importet succsessfully the history_xxx and trends_xxx tables. But i don't get the history in the webfrontend.

    I did this this way:

    1. I used in the Zabbix-Webfrontend the Export Host funktion and importet the host on the new server

    2. I used phpMyAdmin export funktion. I wrote selects which only take the data from the item ids which owned by the host. Then used the export funktion on the returned datas.

    3. I knew that the itemIds are in the new server different. So i wrote a mysql procedure which translate the itemIds (the key + host can identifie your item)

    4. Insert the history and trend datas and restart the zabbix Server (don't think that this was neccessary but you know....)

    I didn't get any errors. But one thing confused me. In the table "history_text" exist a column named "id". I have no idea what this column do, or where the id's come from. Do's anyone know this?

    I nearly ignored the patch cause only some little changes on the schema was made (on the new server i had the new schema). I only added the column "ns" in every table and insertet "0".

    Maybe i just forgotten one little thing. Somebody have an idea?

    Comment

    Working...