DRUPAL - HOW TO MAKE A MYSQL DATABASE BACKUP

Here is how you can backup your Drupal's MySQL database from a terminal:

mysqldump -u my_drupal_mysql_user_name -p my_drupal_mysql_database_name > ~/my_drupal_sql_dump.sql

I like to clear all Drupal caches before running the dump so that there is not a lot of cache data in the export, and therefore it is a clean export that weighs as little as possible.

If you prefer to use Drush, see this article instead: Use Drush to export/import a Drupal MySQL database dump file

Need a Drupal Expert?

Senior Drupal developer, freelance, specialized in what's hardest: migrations, multilingual sites, SaaS platforms and Stripe integration. I leverage AI to cut delivery times and costs, with expert review on every line of code.

No agency, no middlemen. Direct contact with the one who does the work.