Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drush 9 sql-sync does not accept the --structure-tables-list option #3045

Closed
gaelg opened this issue Oct 9, 2017 · 7 comments
Closed

Drush 9 sql-sync does not accept the --structure-tables-list option #3045

gaelg opened this issue Oct 9, 2017 · 7 comments
Assignees

Comments

@gaelg
Copy link
Contributor

gaelg commented Oct 9, 2017

drush -y sql-sync --structure-tables-list=watchdog,cache_*,search_api_db_* @prod @dev
gives the following error:
[Symfony\Component\Console\Exception\RuntimeException] The "--structure-tables-list" option does not accept a value.

@weitzman
Copy link
Member

Can you post full --debug log. Also post the output of drush status on both sides of the sql-sync. Thanks.

@gaelg
Copy link
Contributor Author

gaelg commented Oct 10, 2017

Thank you for your attention. Here's my log.

ggosset@ggosset-desktop ~/workspace/insite_drupal (drush9 *=) $ drush @test status
Drupal version : 8.4.0
Site URI : default
DB driver : mysql
DB hostname : localhost
DB port :
DB username : drupal_drush9_t
DB name : drupal_drush9_test
Database : Connected
Drupal bootstrap : Réussi
Default theme : bartik
Admin theme : adminimal_theme
PHP binary : /usr/bin/php5
PHP config : /etc/php5/cli/php.ini
PHP OS : Linux
Drush script : /my/root/drupal-drush9/web/drush
Drush version : 9.0-dev-g46042c9
Drush temp : /tmp
Drush configs : /my/root/drupal-drush9/vendor/drush/drush/drush.yml
Drush aliases : /my/root/drupal-drush9/drush/docker.alias.yml
/my/root/drupal-drush9/drush/preprod.example.alias.yml
/my/root/drupal-drush9/drush/prod.example.alias.yml
/my/root/drupal-drush9/drush/staging.example.alias.yml
/my/root/drupal-drush9/drush/test.alias.yml
Install profile : config_installer
Drupal root : /my/root/drupal-drush9/web
Site path : sites/default
Files, Public : sites/default/files
Files, Private : ../private
Files, Temp : /tmp
Connection to my.domain.fr closed.
ggosset@ggosset-desktop ~/workspace/insite_drupal (drush9 =) $ drush @docker status
Drupal version : 8.4.0
Site URI : http://localdocker:8000
DB driver : mysql
DB hostname : mariadb
DB port :
DB username : drupal
DB name : drupal
Database : Connected
Drupal bootstrap : Réussi
Default theme : bartik
Admin theme : adminimal_theme
PHP binary : /usr/bin/php7
PHP config : /etc/php7/php.ini
PHP OS : Linux
Drush script : /var/www/html/vendor/drush/drush/drush
Drush version : 9.0-dev-g46042c96
Drush temp : /tmp
Drush configs : /var/www/html/vendor/drush/drush/drush.yml
Drush aliases : /var/www/html/drush/docker.alias.yml
/var/www/html/drush/preprod.example.alias.yml
/var/www/html/drush/prod.example.alias.yml
/var/www/html/drush/staging.example.alias.yml
/var/www/html/drush/test.alias.yml
Install profile : config_installer
Drupal root : /var/www/html/web
Site path : sites/default
Files, Public : sites/default/files
Files, Private : ../private
Files, Temp : /tmp
Connection to localdocker closed.
ggosset@ggosset-desktop ~/workspace/insite_drupal (drush9 =) $ drush --debug -y sql-sync --structure-tables-list=watchdog,cache_,search_api_db_
@test @docker
Using the Drush script found at /home/ggosset/workspace/insite_drupal/vendor/drush/drush/drush using pcntl_exec

[Symfony\Component\Console\Exception\RuntimeException]
The "--structure-tables-list" option does not accept a value.

Exception trace:
() at /home/ggosset/workspace/insite_drupal/vendor/symfony/console/Input/ArgvInput.php:230
Symfony\Component\Console\Input\ArgvInput->addLongOption() at /home/ggosset/workspace/insite_drupal/vendor/symfony/console/Input/ArgvInput.php:153
Symfony\Component\Console\Input\ArgvInput->parseLongOption() at /home/ggosset/workspace/insite_drupal/vendor/symfony/console/Input/ArgvInput.php:84
Symfony\Component\Console\Input\ArgvInput->parse() at /home/ggosset/workspace/insite_drupal/vendor/symfony/console/Input/Input.php:63
Symfony\Component\Console\Input\Input->bind() at /home/ggosset/workspace/insite_drupal/vendor/symfony/console/Command/Command.php:222
Symfony\Component\Console\Command\Command->run() at /home/ggosset/workspace/insite_drupal/vendor/symfony/console/Application.php:859
Symfony\Component\Console\Application->doRunCommand() at /home/ggosset/workspace/insite_drupal/vendor/symfony/console/Application.php:206
Symfony\Component\Console\Application->doRun() at /home/ggosset/workspace/insite_drupal/vendor/symfony/console/Application.php:125
Symfony\Component\Console\Application->run() at /home/ggosset/workspace/insite_drupal/vendor/drush/drush/src/Preflight/Preflight.php:302
Drush\Preflight\Preflight->doRun() at /home/ggosset/workspace/insite_drupal/vendor/drush/drush/src/Preflight/Preflight.php:175
Drush\Preflight\Preflight->run() at /home/ggosset/workspace/insite_drupal/vendor/drush/drush/drush.php:62
require() at /home/ggosset/workspace/insite_drupal/vendor/drush/drush/drush:4

sql:sync [--no-dump] [--no-sync] [--runner [RUNNER]] [--create-db] [--db-su [DB-SU]] [--db-su-pw [DB-SU-PW]] [--target-dump [TARGET-DUMP]] [--source-dump [SOURCE-DUMP]] [--no-source-dump] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-d|--debug] [-y|--yes] [--remote-host REMOTE-HOST] [--remote-user REMOTE-USER] [-r|--root ROOT] [-l|--uri URI] [--simulate] [--pipe] [-D|--define DEFINE] [--druplicon] [--skip-tables-key] [--structure-tables-key] [--tables-key] [--skip-tables-list] [--structure-tables-list] [--tables-list] [--notify [NOTIFY]] [--xh-link] [--]

ggosset@ggosset-desktop ~/workspace/insite_drupal (drush9 *=) $

@weitzman
Copy link
Member

This looks odd Drush script : /my/root/drupal-drush9/web/drush. You have a copy of drush under /web?

Your drush inside docker is more what I would expect - Drush script : /var/www/html/vendor/drush/drush/drush

I do think there is a problem with @hook option methods. I'll leave this open so I review those.

@gaelg
Copy link
Contributor Author

gaelg commented Oct 10, 2017

Yes, web/drush was just a symlink (useless in this context). I changed paths.drush-script in my alias file, and I get the exact same problem.

@mf-lit
Copy link

mf-lit commented Oct 16, 2017

FWIW, I've seen similar behaviour with "sql-dump --skip-tables-key":

$ drush @mysite sql-dump --skip-tables-key=common 

[Symfony\Component\Console\Exception\RuntimeException]   
  The "--skip-tables-key" option does not accept a value. 

$ drush @mysite status
 Drupal version   : 8.4.0                                                                                      
 Site URI         : redacted                              
 DB driver        : mysql                                                                                      
 DB hostname      : localhost                                                                                  
 DB port          :                                                                                            
 DB username      : redacted                                                                          
 DB name          : redacted                                                                         
 Database         : Connected                                                                                  
 Drupal bootstrap : Successful                                                                                 
 Default theme    : abs                                                                                        
 Admin theme      : seven                                                                                      
 PHP binary       : /usr/bin/php5                                                                              
 PHP config       : /etc/php5/cli/php.ini                                                                      
 PHP OS           : Linux                                                                                      
 Drush script     : /srv/www/redacted/vendor/drush/drush/drush     
 Drush version    : 9.0.0-beta7                                                                                
 Drush temp       : /tmp                                                                                       
 Drush configs    : /srv/www/redacted/vendor/drush/drush/drush.yml 
 Drush aliases    :                                                                                            
 Install profile  : standard                                                                                   
 Drupal root      : /srv/www/redacted/docroot                      
 Site path        : sites/default                                                                              
 Files, Public    : sites/default/files                                                                        
 Files, Temp      : /tmp   

@weitzman
Copy link
Member

Should be fixed in master

@gaelg
Copy link
Contributor Author

gaelg commented Oct 26, 2017

Yes, it seems to work now. I can't really test the whole process because of #3046 but I don't get any error message on DB export and I see "-ignore-table=drupal_drush9_test.cache_bootstrap --ignore-table=drupal_drush9_test.cache_config [...]" in the system call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants