Closed (fixed)
Project:
Drush
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
21 Apr 2010 at 09:10 UTC
Updated:
9 May 2010 at 11:50 UTC
I have set aliases for my local and remote
$aliases['dev'] = array(
'uri' => 'localhost',
'root' => '/var/www/foo',
);
$aliases['server'] = array(
'remote-host' => 'example.com',
'remote-user' => 'amitaibu',
'path-aliases' => array(
'%drush-script' => '/home/amitaibu/.drush/drush/drush',
'%dump' => '/var/www/foo.example.com/foo.sql',
),
);
$aliases['foo_server'] = array(
'parent' => '@server',
'uri' => 'http://foo.example.com',
'root' => '/var/www/foo.example.com',
);
The following works:
drush @dev sql-connect -v
drush @foo_server sql-connect -v
However If I try to drush sql-sync -v @foo_server @dev
I get an error:
Load alias @dev [notice]
Load alias @foo_server [notice]
Load alias @server [notice]
Undefined offset: 1 backend.inc:112 [notice]
Undefined variable: output backend.inc:119 [notice]
The command could not be executed successfully (returned: bash: drush: [error]
command not found
, code: 127)
Error: no database record could be found for @foo_server [error]
An error occurred at function : drush_sql_sync [error]
Command dispatch complete
Comments
Comment #1
greg.1.anderson commentedIn order to run commands remotely, you need to set up your ssh keys so that your local machine can connect to your remote machine. You can google for instructions on how to do this, but an easier way is to use the
pushkeydrush command to set it up for you. Soon I'll be setting up the drush_extras project so that you can just usedrush dl drush_extrasto do that, but until I do that, you can pick it up from #754106: drush pushkey. Just drop it in your ".drush" folder in your home directory.Comment #2
amitaibu> In order to run commands remotely, you need to set up your ssh keys so that your local machine can connect to your remote machine.
I can already do it - e.g.
drush @foo_server sql-dump >db.sqlworks - Only sql-sync doesn't work.Comment #3
amitaibuhmm, actually the sql-dump didn't work, but sql-connect does. I'm probably doing something wrong...