4

I'm syncronizing databases form stage to local environments with drush commands like:

drush @dev sql-drop
drush @stage @dev sql-sync

How can I protected that the @stage server reject to drop or sync its database like:

drush @dev @stage sql-sync
drush @dev sql-drop

I think this is a common problem, maybe there is some params that can be set in drushrc.php file. How can I manage that? Thanks!

4

This is best done with a policy file. See policy.drush.inc, which has an example policy prohibiting overwriting a production server.

The example could be expanded to perhaps check for patterns in the destination parameter (any alias containing 'prod'), etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.