Hubidubi
Hubidubi

Reputation: 880

drush site sync with aliases

I configured site aliases for dev and staging site. I have <DRUPAL_HOME>/sites/default/aliases.drushrc.php aliases file with this content:

<?php

$aliases['dev'] = array(
                        'root' => '/home/drupaltest',
                        'uri' => 'localhost',
                        'path-aliases' => array(                                                    '%dump' => '/home/drupaltest/dump.sql')
                        );

$aliases['stage'] = array(
                        'root' => '/home/drupaltest',
                        'uri' => 'naftalin',
                        );


$aliases['all-scratch'] = array(
                                'site-list' => array('@dev', '@stage'),
                                );

?>

drush @dev status output:

hubidubi@couscous:/home/drupaltest$ drush @dev status
 Drupal version         :  6.25                                                                
 Site URI               :  localhost                                                           
 Database driver        :  mysqli                                                              
 Database hostname      :  localhost                                                           
 Database username      :  root                                                                
 Database name          :  drupaltest                                                         
 Database               :  Connected                                                           
 Drupal bootstrap       :  Successful                                                          
 Drupal user            :  Anonymous                                                           
 Default theme          :  garland                                                             
 Administration theme   :  garland                                                             
 PHP configuration      :  /etc/php5/cli/php.ini                                               
 Drush version          :  4.4                                                                 
 Drush configuration    :                                                                      
 Drush alias files      :  /home/drupaltest/sites/default/aliases.drushrc.php 
 Drupal root            :  /home/drupaltest                                   
 Site path              :  sites/default                                                       
 File directory path    :  sites/default/files

Then I tried to run drush rsync @dev @stage command to sync dev site to stage and I get:

Could not evaluate source path @dev.

I can't figure out the problem, I think the alias file is correct.

Any idea?

Hubidubi

Upvotes: 1

Views: 844

Answers (1)

Wim Leers
Wim Leers

Reputation: 1631

Verify the resulting rsync command using drush rsync @dev @stage --simulate.

Note: you may also want to read: Alias Not Working (for drush rsync).

Upvotes: 2

Related Questions