I am new to use Drush.

this following is my .drushrc.php file

$aliases['server'] = array (
  'remote-host' => '',
  'remote-user' => 'root',
$aliases["dxb"] = array (
  '#name' => 'dxb',
  'root' => '/var/www/dev/daxuebao',

I try to use this following command to sync local site to remote site

$ drush rsync @self @dxb

But it alert me:

rsync: mkdir "/var/www/dev/daxuebao" failed: No such file or directory (2)
rsync error: error in file IO (code 11) at /SourceCache/rsync/rsync-42/rsync/main.c(544) [receiver=2.6.9]
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-42/rsync/io.c(452) [sender=2.6.9]
Could not rsync from /Users/tangmonk/Sites/drupal/daxuebao// to      [error]

It seems directory /var/www/dev/daxuebao do not exist, so I try to mkdir to my server :

$ mkdir /var/www/dev/daxuebao

The I type $ drush rsync @self @dxb again, But still above problem.
How to solved it?

  • So /var/www/dev/daxuebao definitely exists? As in, if you type cd /var/www/dev/daxuebao from your command line, it resolves to the expected location, and doesn't give a "No such file or directory" error? – Clive Mar 4 '14 at 10:46
  • thanks for your reply, /var/www/dev/daxuebao is exist. I updated my question, please help me. – TangMonk Mar 4 '14 at 11:46
  • As far as I can see the error message means either /var/, /var/www/ or /var/www/dev doesn't exist on the remote server. Or maybe it's a permissions problem, couldn't really say from here I'm afraid – Clive Mar 4 '14 at 11:49
  • thanks for your reply, I run the rsync command as root user, Probably not a permissions issue. And the /var/, /var/www/ and /var/www/dev directory is exist. – TangMonk Mar 4 '14 at 11:57
  • possible duplicate of Why drush fails to rsync between my two local instances? – kenorb Apr 22 '15 at 18:07

Make sure the string containing the directory does not have extra blank spaces at the end. Trim it if possible. I was getting a similar message when I was using the option --files-from=myDirList and I have some spaces after the directory name inside the myDirList.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.