I'd like to use
drush to sync files from local server to production server. I have edited the
aliases.drushrc.php file and placed inside
/drush/aliases in both local and remote machines. Everything seems to work fine except that drush understands that both sites are in the same server since I do not know how to tell drush that local is in another machine in my local server.
I guess it's something to do with uri but I do not know what should I write there.
I've tried with this:
$aliases['local'] = array( 'uri' => 'mysite.localhost', 'root' => '/home/user/www/mysite', );
$aliases['local'] = array( 'uri' => 'localhost/mysite', 'root' => '/home/user/www/mysite', );
mysite the name of the folder placed in
/home/user/www in my local server, but none of them seem to work.
Anyone can tell me what am I doing wrong?
I have placed
mysite.aliases.drushrc.php in my local sites folder.
However I didn't succeed with the following code in my local site:
drush rsync @mysite.live:%files @mysite.local:%files
This is what I get:
You will destroy data from @mysite.local:/home/user/www/mysite/%files and replace with data from @carloscamara.live:/home/user/www/mysite/%files
Do you really want to continue? (y/n): y
The source and destination cannot both be remote.
rsync error: syntax or usage error (code 1) at main.c(1166) [Receiver=3.0.8]
$aliases['local'] = array( 'uri' => 'localhost/mysite', 'root' => '/home/user/www/mysite', 'path-aliases' => array( '%files' => 'sites/default/files', ), 'command-specific' => array ( 'sql-sync' => array ( 'no-cache' => TRUE, ), $aliases['live'] = array( 'uri' => 'mysite.com', 'root' => '/home/user/mysite'; 'remote-machine' => 'mysite.com'; 'remote-user' => 'myusername', 'remote-host' => 'mysite.com', 'path-aliases' => array( '%files' => '/home/myusername/mysite.com/sites/default/files', ), );