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-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