User login

Drush

Upgrading Drush from 2 to 3 with lenny

As root:
aptitude
Find drush under PHP.

At the bottom of the information about the drush package, there's an i that means installed next to 2.0 and a p that means no packages or config files or anything are present next to drush 3.3.

Type + when the drush 3.3 line is highlighted.

Then type g to upgrade (twice, first it takes us to a confirmation page).

Note: On Agaric's servers the package list is updated daily by a cron job, but updating the package list can be invoked by hitting u if necessary.

Features re-export / download; meaningless warning message?

The following overridden view(s) are provided by other modules: highlight. To resolve this problem either revert each view or clone each view so that modified versions can be exported withy our feature.

Features appears to be unaware that it is the very feature i am exporting that is the module that provides the View highlight.

Exporting the feature again worked fine.

More info on the general process of re-exporting features:

If no new components are added:

drush fu features_example

Export and re-import a database with Drush and the command line

These are run from the project's web root, example/web, so that drush can run, but the database itself is stored outside the web root, example/db.

On the export side:

drush sql-dump > ../db/development.sql

On the import side:

drush sql-connect < ../db/development.sql

expands to:

mysql -hlocalhost -uexample -pyMsx2rIP drupal-example < ../db/development.sql

Using Drush 3.1 by installing it in your local user directory

The version of drush in Debian is way behind. Drush 3.1 has been out for a month, Drush reached stable 3.0 on April 23.

Stefan was unsympathetic:

That does not mean the package is ready. What the upstream authors consider stable and the Debian community considers stable might be different things, too. Quality is Debian's top priority not up to date software. In addition to that it will only get into the next stable distro and maybe into the backports repository. In that case we get the upgrade automatically.

Remote drush commands

How we would probably want this to work is that "rake prod vlad:drush XXX" call "ssh prodservername drush -r /path/to/project/drupal XXX"

For instance: ssh prodservername drush -r /path/to/project/drupal enable bad_judgement

Using Drush to list your modules and their statuses: drush sm (for show modules)

On the command line and want to list the modules you have on your site? Fortunately, there's a module-listing command that Agaric's Stefan Freudenberg contributed to Drush.

drush sm

Think "show modules" to remember sm. (The official full name of the command is pm-list which is confusing so just ignore it.)

You can do all your usual fancy command line things:

ben@ubuntu:~/code/agaric/web$ drush sm | grep Views

Path to Drush

export PATH=$PATH:/usr/local/share/php/drush

via http://www​.mediacurr​ent.com/bl​ogs/learni​ng-how-ins​tall-drush​-non-admin​-rights-se​rver

Drush database commands

Update: See http://data.agaric.com/use-drush-sync-database-from-one-site-another

[Note: currently written mostly from memory after using the commands, not copy-pasting proven commands as i usually do]

Syndicate content