The DB dumps created by the backup tool do not disable foreign key checks.
As such, the SQL files created will often fail on import if foreign keys exist in the relevant (custom) tables.
Is it just about adding a "SET FOREIGN_KEY_CHECKS=0;" before the DROP-Statements and "SET FOREIGN_KEY_CHECKS=1;" after them? Or is the solution more complicated?
I think that should be fine.
If you look at an SQL dump produced by mysqldump you will see it saves the original FOREIGN_KEY_CHECKS setting instead of assuming it was 1.
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0
and at the end...
It is added now.