I just used drush rsync and drush sql-sync to move a drupal 6 site from production to development.
It worked extremely well, other than an issue with permissions. The production site had the owner as nobody (Apache, I believe), while the development site had the owner as a user. Until I played around with permissions, the test site wouldn't work.
I assume there are various options, including changing owners or making sure that rsync doesn't overwrite permissions? What would people recommend, assuming the site might move back and forth between production and development from time to time?
I realize that this might not, technically, be a drush question (other than the possibility of making sure that drush doesn't transfer permissions that won't work with a different owner), but drush is potentially so useful for this scenario that it would be great to document how to handle this scenario in one place.
Comments
Comment #1
greg.1.anderson commentedI answered this question once already; please search the issue queue and see if you can find it. If you do, I'll turn it into an entry in drush topic.
Comment #2
greg.1.anderson commentedSee #990812: Add a "permissions" subcommand to fix/set all file permissions, which points to #1169778-#16, which is the issue I was referring to in #1.
Comment #3
greg.1.anderson commentedI might also mention that the above issue does not mention the git workflow, which is another very useful way to move files between sites. The permission issues are similar with git, so the above is still applicable to the git workflow.
Comment #4
greg.1.anderson commentedI might want to wait for the resolution of #1342940: Simplify documentation for shell alias replacements before I write docs on how to move files around using drush.
Comment #5
moshe weitzman commentedThis is a nice to have item for drush5
Comment #6
greg.1.anderson commentedI've been meaning to do this for almost a year now. :p I quickly wrote a couple more comments about this on SE today: http://drupal.stackexchange.com/questions/45321/permissions-and-ownershi...
Comment #7
greg.1.anderson commentedSome additional sample code available in #841310: How to change permissions and owner after dl / update?.
Comment #8
greg.1.anderson commentedThis issue was marked
closed (won't fix)because Drush has moved to Github.If this feature is still desired, you may copy it to our Github project. For best results, create a Pull Request that has been updated for the master branch. Post a link here to the PR, and please also change the status of this issue to
closed (duplicate).Please ask support questions on Drupal Answers.