I have a Magento2.4 commerce cloud and I need to dump the existing staging website database and then take an existing database dump I just made which is on production. var folder and get it imported into the Magento2 commerce cloud database.

I see a lot of posts talking about dumping a database but not alow of detail specifically on getting a commerce cloud database emptied and then importing a production database and then changing the base url etc in the database.

Any videos or tutorials anyone knows of?

3 Answers 3


Have you checked this for dump and import in the commerce cloud? https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/develop/deploy/staging-production.html

  • I have checked the doc but not clear still on how to take the .gz export of the production database that is sitting on the production server and how to import it into staging?
    – Jayreis
    Mar 3, 2023 at 18:39

Migrating a database from one environment to another can be a complex task, especially when dealing with a cloud environment like Magento Commerce Cloud.



We just dump the database into a gz file in staging environment. and then move the gz file from staging to production. And then import the gz file into the database of production.

# export the database in staging
mysqldump -h --user=db_user_name --password=db_password --single-transaction database_name  | sed -e 's/DEFINER[ ]*=[ ]*[^*]*\*/\*/' | gzip > /tmp/db_dump.sql.gz

# import the db_dump.sql.gz into the database in production
zcat /tmp/db_dump.sql.gz | sed -e 's/DEFINER[ ]*=[ ]*[^*]*\*/\*/' | mysql -h -u db_user_name -p db_password
  • Thank you. I seem to be getting an error that says The table 'quote_item' is full any suggestions on how to troubleshoot this? I saw online to increase the mysql → disk parameter’s value to any other value in the .magento/services.yaml file, and then commit the change via Git to the server. However, I do not see a services.yaml file in my local or report?
    – Jayreis
    Mar 7, 2023 at 15:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.