0

How do I exclude Drupal's user table from drush's sql-sync command?

0

The command is executed like this, if you're going to ignore the users table might as well ignore roles and permissions too, but that's up to you:

drush sql-sync -v --skip-tables-list=users,users_roles,role_permission @prod @dev

-v is optional and will display what the command is doing & confirm the tables are being skipped like so:

The following tables will be skipped: role_permission,users,users_roles
4

You can use --skip-tables-list flag on your drush sql-sync command

drush sql-sync @prod @dev --skip-tables-list=user

the table lists should be comma seperated.

For more options on sql-sync check this documentation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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