@local is on localhost
@remote is remote with SSH running on port 2222, so the alias has
'ssh-options' => '-p 2222',

run this on localhost: 'drush -d sql-sync @remote @local'
and it fails on the rsync command executed to move the .sql file from @remote to @local

but what's happened is it is trying to pass
-ssh-options='-p 2222'
as a parameter to the rsync command, so rsync fails. The 'ssh -p 2222' parameter looks correct.

What seems odd to me is drush rsync @remote @local works perfectly, so the code generating the rsync command must be different in those two cases. The code is a bit complex, due to all the cases to be kept in mind, so I haven't identified just the right spot for a fix yet.

-- Cronin

PS - I shoulda taken up drush long ago. This stuff rocks.

Comments

dman’s picture

I can confirm this.

Calling system(rsync -e 'ssh -p 22122' -akzv --exclude=".git" --exclude=".gitignore" --exclude=".hg" --exclude=".hgignore" --exclude=".hgrags" --exclude=".bzr" --exclude=".bzrignore" --exclude=".bzrtags" --exclude=".svn" --stats --progress --ssh-options='-p 22122' username@dev.host:/var/www/sitename/backups/dev.sitename-dump.sql /private/tmp/sitename_dev.sql.kN0B24);

This used to work fine for me. I did a recent update to drush version 5.0-dev .
See that the
rsync -e 'ssh -p 22122' at the beginning is fine, but
--ssh-options='-p 22122' is also being passed as an inline option.

greg.1.anderson’s picture

Fixed in commit 121586e.

cvining’s picture

Perfect. I confirm your patch works.

That took, what, 2hrs 6min. Astonishing. And on a Saturday morning, too.

Thanks!

-- Cronin

greg.1.anderson’s picture

Status: Active » Fixed
dman’s picture

Well Done!

Status: Fixed » Closed (fixed)

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