Ad Widget

Collapse

Zabbix 5.0.x Database restore

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Aruzsi
    Junior Member
    • Apr 2023
    • 4

    #1

    Zabbix 5.0.x Database restore

    Hi,

    My Zabbix DB was stopped working more than a year.
    Postgresql 12.
    Ubuntu 20.04
    Zabbix 5.0.x.

    In these days I tried to get back the configuration from the database.
    It was successful more or less. I dropped all trend and history data.

    I recreated a new DB under postgresql 14. The dtatabase is running.

    Today I tried to connect the zabbix_server and I got those lines:

    QUERY: CREATE TABLE IF NOT EXISTS partitions.history_p2025_02_08 (CHECK ((clock >= '1738969200.000000' AND clock < '1739055600.000000'))) INHERITS (history)
    CONTEXT: PL/pgSQL function trg_partition() line 37 at EXECUTE
    [insert into history (itemid,clock,ns,value) values (23265,1739038245,137507513,0),(23625,1739038245,1 37468148,7.5957959238138804);
    ]
    16973:20250208:191046.391 [Z3005] query failed: [0] PGRES_FATAL_ERROR:ERROR: invalid input syntax for type integer: "1738969200.000000"
    LINE 1: ... partitions.history_p2025_02_08 (CHECK ((clock >= '173896920...
    ^

    ChatGPT said me: the clock is integer and the '' is wrong! Why happened this?
    How can I solve the problem?
    Before I restored the backup I used the schema.sql and it was made an empty zabbix DB. After that I used my backup.

    I don't know what is the problem? The zabbix_server was installed from factory deb package.

    Please help me!

    TIA,
    Ruzsi
  • Aruzsi
    Junior Member
    • Apr 2023
    • 4

    #2
    Some more information:

    Postgresql is not 12 it is 14 (and it will be 16 or 17 soon).
    Timescale 2.18.0!
    Zabbix server: 5.0.46

    Comment

    Working...