Now that we have our site aliases configured, we can benefit from running two of the most powerful Drush commands: sql-sync
and core-rsync
. The former is used to copy the database from a Drupal project to another, while the latter copies files between Drupal projects. In this section, we will see some suggestions to make them safer and efficient in our projects.
Previously in this chapter, we have seen examples of both these commands. They take two site aliases as arguments. The first one is the from (also known as source) and the second one is the to (also known as destination). I like to mentally tell it to myself when I type these commands so that I make sure that I copy them in the right direction. I mumble drush sql-sync from to. The reason for such thoroughness is that when running core-rsync
and sql-sync
commands, the order does matter a lot. Here is an example: while working in a development team, we would run these commands every once...