Use Drush to sync files from one site to another
Believe it or not, this is the function you want:
core-rsync (rsync) Rsync the Drupal tree to/from another server using ssh.
For example:
drush rsync @example.stage:%files @example.local:%files
Can't do remote to remote though.
drush rsync @sdl.stage:%files @sdl.test:%files
You will destroy data from ben@simone.mayfirst.org:/var/local/drupal/sdl/web/sites/default/files and replace with data from ben@simone.mayfirst.org:/var/local/drupal/sdl-stage/web/sites/default/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(1156) [Receiver=3.0.7]
Could not rsync from [error]
ben@simone.mayfirst.org:/var/local/drupal/sdl-stage/web/sites/default/files/ to
ben@simone.mayfirst.org:/var/local/drupal/sdl/web/sites/default/files
adapted from:
Synchronize one drupal site with another using Drush
http://www.leveltendesign.com/blog/dustin-currie/synchronize-one-drupal-site-to-another
See set-up for site aliases at Use Drush to sync the database from one site to another.
drush rsync @dev.mysite:%files @local.mysite:%files
For instance:
drush rsync @anjali.prod:%files @anjali.dev:%files
drush rsync @anjali.dev:%files @anjali.dev7:%files
Comments
Post new comment