I try to rsync between a multisite setup (local) and a multisite setup (stage). If I run a sync it will copy all sites from dev to stage but I just want the current site to be synced.
$drush rsync @dev @stage
My drush alias file is located in ~/.drush/example.aliases.drushrc.php
$aliases['local'] = array(
'root' => '/Users/admin/Sites/drupal',
'uri' => 'example.local',
'shell-aliases' => array(
'dump' => '!drush sql-dump --gzip --ordered-dump'
),
'path-aliases' => array(
'%dump' => '/Users/admin/dev-' . date('Ymdhis') . '.sql',
'%drush' => '/Users/admin/drush',
'%site' => 'sites/example/',
),
);
// REMOTE: STAGING
$aliases['stage'] = array(
'remote-user' => 'xyz',
'remote-host' => 'stage.example.com',
'root' => '/home/xyz/www/stage.example.com',
'uri' => 'stage.example.com',
'path-aliases' => array(
'%drush' => '/home/xyz/drush',
'%drush-script' => '/home/xyz/drush/drush',
'%dump-dir' => '/Users/admin/.drush-backups/example.stage',
'%site' => 'sites/example/',
),
'command-specific' => array(
'sql-sync' => array(
'no-cache' => TRUE,
)
),
'shell-aliases' => array(
'dump' => '!drush sql-dump --gzip --ordered-dump'
),
// DB
'databases' =>
array(
'default' =>
array(
'default' =>
array(
'database' => 'xyz',
'username' => 'xyz',
'password' => 'xyz',
'host' => 'xyz',
'port' => 'xyz',
'driver' => 'mysql',
'prefix' => '',
),
),
),
);
Questions:
%site: My project folder in sites/ is called example on the local side and has the same name on the staging side. Do they need to be different?
Do i need to put all domains in site.php on my staging server? At the moment I am using just the actual setup ($sites['stage.example.com'] = 'stage.example.com';) on my staging server. My local sites.php file:
$sites['example.local'] = 'example.local'; $sites['stage.example.com'] = 'stage.example.com'; $sites['example.com'] = 'live.example.com';
Are the directories all/ and default/ always needed?
My local Setup:
- Drush 7.x dev
- PHP 5.5.x
- MAMP
My Server Setup:
- Drush 7.x dev
- PHP 5.5.x
Edit: Removed opinion based questions ;)