After I upgraded to Zabbix 6.4.3 I noticed that it didn't support the $1 in item name.
I wanted to return to my previous version of Zabbix 5.4.7
So I made a new backup using Plesk...
And then restored a 2 week old back-up and it didn't work
so I thought I would be up and running quickly doing the fresh back-up I previously made.
I got this
It turns out that I do not have the table auditlog in my database zabbix anymore since the restore from an mysqldump
To know what happened I tried to do a manual restore of the database using
It does this with the command CREATE TABLE `auditlog`
I also tried to create the table using the command that's in schema.sql and it throws me the same error. (this was because I didn't drop the database first)
I'm now suspecting it has something to do with the order the tables are created in the mysqldump.
Is this true? (EDIT: yes, it was the reason!!!!)
In the dump the tables are created in alphabetical order...
I wanted to return to my previous version of Zabbix 5.4.7
So I made a new backup using Plesk...
And then restored a 2 week old back-up and it didn't work
so I thought I would be up and running quickly doing the fresh back-up I previously made.
I got this
Code:
"SQL statement execution has failed "INSERT INTO auditlog (auditid,userid,username,clock,ip,action,resourcetype,resourceid,resourcename,recordsetid,details) VALUES ....
To know what happened I tried to do a manual restore of the database using
Code:
mysql -uadmin -p`cat /etc/psa/.psa.shadow` zabbix < backup_sqldump_2306200016 ERROR 1005 (HY000) at line 220: Can't create table `zabbix`.`auditlog` (errno: 150 "Foreign key constraint is incorrectly formed")
I also tried to create the table using the command that's in schema.sql and it throws me the same error. (this was because I didn't drop the database first)
I'm now suspecting it has something to do with the order the tables are created in the mysqldump.
Is this true? (EDIT: yes, it was the reason!!!!)
In the dump the tables are created in alphabetical order...
Comment