# Problem importing large database backup

**URL:** <https://forum.mautic.org/t/problem-importing-large-database-backup/22800>\
**Category:** Product Support\
**Tags:** mautic-3\
**Created:** [February 23, 2022, 2:53pm UTC](https://forum.mautic.org/t/problem-importing-large-database-backup/22800 "2022-02-23T14:53:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zerog](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/zerog/32/6924_2.png) [@zerog](https://forum.mautic.org/u/zerog)\
**Post date:** [February 23, 2022, 2:53pm UTC](https://forum.mautic.org/t/problem-importing-large-database-backup/22800/1 "2022-02-23T14:53:38Z")

</div>

My Mautic version is: 3.2.5  
My PHP version is: 7.4  
My Database type and version is: MariaDB 10.5

**Your problem**

I have a Mautic database that I exported for backup on cPanel because I wanted to upgrade the app. I got some error during the upgrade. Now I’m trying to import it back to phpmyadmin and it’s throwing me errors.

Everything was working great before trying to upgrade.

I’m doing the import through command line. It is a big database with around 4GB.

This is the error:

ERROR 1452 (23000) at line 18877179: Cannot add or update a child row: a foreign key constraint fails (`zgmedi5_marketing_gdp`.`#sql-alter-74d1-722`, CONSTRAINT `FK_9EED7E6655458D` FOREIGN KEY (`lead_id`) REFERENCES `leads` (`id`) ON DELETE CASCADE)

Steps I have tried to fix the problem:

- I updated MariaDB from 10.2 to 10.5.
- Created a clean database with the same name and tried to import it.
- Tried to import via UI of phpmyadmin.
