Drupal - How to skip specific tables with drush sql-dump?

Dump all tables except the cache table and tables starting with cache_.

drush sql-dump --skip-tables-list=cache,cache_* > dumpfile.sql

Database structure only. No data at all.

drush sql-dump --extra=--no-data > dumpfile.sql

Data only. No cache data and no cache structure.

drush sql-dump --skip-tables-list=cache,cache_* --data-only > dumpfile.sql

No cache data but dump in their structures.

drush sql-dump --structure-tables-list=cache,cache_* > dumpfile.sql

sql-dump documentation

Tags:

Drush

Backups