Monday, April 23, 2012

Managing your BitNami Drupal installation with Drush

We are happy to announce a new version of BitNami Drupal Stack. This new version includes support for Drush. Drush is a command line shell tool and scripting interface for Drupal designed to make life easier for people who need to deploy multiple Drupal installations.

Thanks to Drush you can easily manage your Drupal modules, edit configuration settings or backup your sites from the command line.

To get started, you first need to load the right environment. This is done automatically when logging in to a virtual appliance or cloud image. If you installed Drupal on your desktop, you can do so by executing:

/path/to/bitnami-drupal-install-directory/use_drupal

and on Windows by clicking on Start Menu > BitNami Drupal Stack > Use Drupal Stack.

The following are example commands you can run after that:
  • Download and install a module, for example Content Construction Kit (CCK ) a popular plugin that allows adding custom fields to nodes using a web browser
          drush pm-download cck
    drush pm-enable cck
  • Export the Drupal database as SQL, for backup purposes
    drush sql-dump > drupal_backup.sql
  • Or you can backup everything, including your code, files, and database into a single file
    drush archive-dump default --destination=/backups/drupal_site.tar
  •  Set a variable, for example the site email address
    drush variable-set site_mail mail@example.com

More information can be found in the official Drush guide. Thanks to OpenMelva for their suggestions and feedback Drush and other aspects of our Drupal stack.

2 comments:

  1. DRUSH ARCHIVE-DUMP doesn't work. Drush says:

    Command archive-dump needs a higher bootstrap level to run - you will need to invoke drush from a more functional Drupal environment to run this command.

    The drush command 'archive-dump' could not be executed. [error]
    A Drupal installation directory could not be found

    ReplyDelete
  2. Did you run the command into the drupal/htdocs folder? It is trying to find a valid drupal installation.

    ReplyDelete