I have created a nifty set of scripts for managing collections of Drupal installations. I find them indispensable for maintaining a large stable of Drupal sites. The scripts allow for automated install and patching of Drupal installations as well as a host of other administrative tasks. They enforce and leverage my best practices for Drupal deployments.
See the README for full information on the scripts within the library as well as usage guidelines:
http://svn.toddgee.com/drupalScripts/README
The scripts themselves can be seen here:
http://svn.toddgee.com/drupalScripts
and can be checked out (read only) with the command:
$ svn co "http://svn.toddgee.com/drupalScripts" drupalScripts
Enjoy! And give me feedback/suggestions/patches by leaving a comment below.
Comments
drush
Check out drush.
yup. I know about drush
In fact, I use it (see the script drupalManageDrush.sh). I use it mainly to run the dbupdate command.
I do think my scripts work better at doing standard tasks than Drush.
Site install directory does not exist
I can't get drupalBackup.sh to find my Drupal install. I tried:
drupalBackup.sh default /home/htdocs/ssdevand get** Error with specified install: Site install directory '/home/htdocs/ssdev/default' does not existMy paths are as follows:Then I tried
drupalBackup.sh default /home/htdocs/ssdev/siteswhich outputs** Error with specified install: Site settings file '/home/htdocs/ssdev/sites/default/sites/default/settings.php' does not existRespond to: nonzero (at) gmailThe Drupal Script Library
The Drupal Script Library follow a strict naming convention that allows the structure to be leveraged to pull off all the neat tricks that it does. In your case, you were setting the DRUPAL_INSTALL_ROOT to '/home/htdocs/ssdev' by specifying it on the command line. It was looking for the drupal installation named 'default' in this directory which it was unable to find. Try:
$ drupalBackup.sh ssdev /home/htdocs
(or set $DRUPAL_INSTALL_ROOT=/home/htdocs and omit the last parameter.) Note, however, that the scripts will look for the site configuration file to be in /home/htdocs/ssdev/sites/ssdev (and not ..../sites/default) -- this is the convention.
Your best bet is to re-install Drupal with the command:
$ drupalCVSDeploy.sh install drupal ssdev.com /home/htdocs
(substitute correct domain name in for 'ssdev.com'...) After this is done, move your settings.php file from
/home/htdocs/ssdev/sites/default/settings.php to
/home/htdocs/ssdev.com/sites/ssdev.com/settings.php
and re-install any contrib modules you have installed w/ subsequent calls to drupalCVSDeploy.sh
hope this helps....