npotorino / zabbix-backup

Backup script for Zabbix configuration data (MySQL/PostgreSQL)
MIT License
67 stars 30 forks source link

unable to restore database on zabbix 6.4.0 with mariadb #22

Closed CappuccinoCake closed 11 months ago

CappuccinoCake commented 1 year ago

Hey guys, i created a backup with this tool, then i set up a new server to test the restore prograss, but i am getting the error:

ERROR: ASCII '\0' appeared in the statement, but this is not allowed unless option --binary-mode is enabled and mysql is run in non-interactive mode. Set --binary-mode to 1 if ASCII '\0' is expected. Query:3d'.

Someone had this problem and now how to solve it.

Kind reguards.

CappuccinoCake commented 1 year ago

Ok. The problem was, that the .gz is zipped 2 times, you have to know that you have to do the step gunzip two times to get plain .sql.

But now I am getting the error: ERROR 1359 (HY000) at line 5595: Trigger 'zabbix_backup.connector_insert' already exists

ironbishop commented 1 year ago

We compress just once. Where did you get the second gz?

Can you confirm you dropped the existing database before restoring?

CappuccinoCake commented 11 months ago

Oh no, it was because of my backup script, it gzipped my files singularily without changing the extension... issue closed.