User login

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 and replace with data from
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] to

adapted from:
Synchronize one drupal site with another using Drush

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

drush rsync @anjali.dev7:%files

Searched words: 
copy transfer download drush transfer files drush what happened to file sync


Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.