On trying to use sql-dump, I am getting an error. See below for the full debug output. I just updated to the most recent dev on the site. Also changed one reference to the path so as to cover my username (~ for my home directory). This is on a Linux host, should that matter.

$ drush sql-dump @project.prod -d
Bootstrap to phase 0. [0.01 sec, 3.1 MB]                             [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drush() [0.01 sec, 3.33 MB] [bootstrap]
Loading drushrc "~/.drush/drushrc.php" into "home.drush" scope.  [bootstrap]
[0.01 sec, 3.34 MB]
Cache HIT cid: 5.0-dev-commandfiles-0-293e9b99a9a826f0e3a95ca2a0ea0af9 [0.02       [debug]
sec, 3.36 MB]
Bootstrap to phase 0. [0.08 sec, 9.47 MB]                                      [bootstrap]
Bootstrap to phase 0. [0.1 sec, 9.52 MB]                                       [bootstrap]
Found command: sql-dump (commandfile=sql) [0.1 sec, 9.52 MB]                   [bootstrap]
Calling system();
system(): Cannot execute a blank command exec.inc:37 [0.15 sec, 9.71 MB]       [warning]
Command dispatch complete [0.15 sec, 9.65 MB]                                     [notice]
Peak memory usage was 11.74 MB [0.15 sec, 9.65 MB]                                [memory]
$

Meanwhile, drush status works just fine...

$ drush @project.prod status
Initialized Drupal 6.24 root directory at ~/drupal/6.x               [notice]
 Drupal version        :  6.24                                                            
 Site URI              :  http://default                                     
 Database driver       :  mysql
/*  Information removed */                                                   
 Database:                  Connected                                                       
 Drupal bootstrap:      Successful                                                      
 Drupal user:              Anonymous                                                       
 Default theme:          custom                                                         
 Administration:         rootcandy_dark                                                  
 theme                                                                                    
 PHP configuration:    /etc/php.ini                                                    
 Drush version:          5.0-dev                                                         
 Drush configuration: ~/drupal/sites/6.x/default/drushrc.php 
                                  ~/.drush/drushrc.php                           
 Drush alias files:       ~/drush/drush-config/project.aliases.drushrc.php
                                 ~/drush/drush-config/aliases.drushrc.php           
 Drupal root:             ~/drupal/6.x                                       
 Site path:                 sites/default                                      
 File directory path:   sites/default/files

Comments

kalkoby’s picture

Version: » 7.x-5.0-rc3

I have the same problem. Subscribe It is the exact same spot.

JSCSJSCS’s picture

You have the command sequence wrong I believe.
Try drush @youralias sql-dump

Just like "drush status @youralias" will probably return nothing, but "drush @youralias status" will work.

There is not a consistant order to all the drush @alias commands.

Example: "drush @youralias site-alias" returns

$ drush site-alias @youralias
$aliases['youralias'] = array (
'uri' => 'local.mywebsite.com',
'root' => 'c:\\wamp\\www\\local.mywebsite.com',
'db_url' => 'mysql://root@localhost/mywebsite',
'path-aliases' =>
array (
'%dump-dir' => 'sqldumps',
'%dump' => 'mywebsite.sql',
'%files' => 'sites/default/files',
),
'#file' => 'c:/Users/user/.drush/aliases.drushrc.php',
);

But "drush site-alias @youralias" returns
$ drush @youralias site-alias
@youralias
@youralias2
@none
@self
default

Leave out the @youralias will get this:
$ drush site-alias
@youralias
@youralias2
@none

Different output and non-intuitive in some cases.

tnanek’s picture

Status: Active » Fixed

That does it, thanks JSCSJSCS.

To add to my own confusion, I have a number of custom commands which take an alias as an argument...

Not sure what I should do with this issue as kalkoby had the same problem. Marking it fixed for now, and if problem still exists, it can be reopened easily enough.

tnanek’s picture

Category: bug » support

Correcting the category of this to fit with the resolution.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

steve.m’s picture

FYI, make sure you set up the DB info in your alias files. Trying to run sql-dump without it results in this same "system(): Cannot execute a blank command exec.inc" error.

steve.m’s picture

Issue summary: View changes

Hiding personal info in my status output.

norman.lol’s picture

Had the same error. Was in wrong directory ^^

batigolix’s picture

yep, verifying that all information in the drush aliases file was correct fixed this issue for me

ron collins’s picture

I didn't have an alias set up for this site so I was using -l www.sitename.com which gave me the error. I had to change it to -l http://www.sitename.com.