Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm aware of mysqldump utility, but is there any way of dumping a single table from database using drush (e.g. for sql-dump, sql-sync)?

share|improve this question
up vote 22 down vote accepted

You can use --tables-list option on drush command to dump specific tables.

drush sql-dump --tables-list=node,system > exportdb.sql

Above command will only make sql-dump for node and system tables.

Source

share|improve this answer
1  
First of all "--table-list" is unknown option. Actually "-tables-list" is used. Second thing that correct option "--tables-list" is not working on Windows machine and full DB dump will be created instead. – Vasyl Zaytsev Jan 26 '15 at 17:11
    
Tested drush sql-dump --tables-list=rules_config --ordered-dump on Drush 8.1-dev, it seems to work fine. – kenorb Apr 4 at 16:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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