Working with Drush - ben600324/wiki GitHub Wiki
Using drush from the command line
You do not need to change users to use drush, all sites and aliases can be accessed like so:
sudo -H -u aegir bash -c 'drush @dtp.dev.uk status'
Drush errors and how to fix them
Drush does not work well with PHP 7.1, if you are experiencing drush errors check which version of PHP is in use with:
drush status
If the version shows PHP 7.1 you can change back to version 7.0 like this:
sudo ln -sfn /usr/bin/php7.0 /etc/alternatives/php
Drush status should now show 7.0
Drush db export/import
import gz
drush sql-drop && drush sqlq --file=db.sql.gz
drush sql-cli < ~/path/to/db-file.sql