How do I exclude Drupal's user table from drush's
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
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.