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. They extend Drush to make things easier (at least for me).
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
Anonymous (not verified)
Fri, 09/04/2009 - 19:06
Permalink
Site install directory does not exist
I can't get drupalBackup.sh to find my Drupal install. I tried:
drupalBackup.sh default /home/htdocs/ssdev
and get** Error with specified install: Site install directory '/home/htdocs/ssdev/default' does not exist
My paths are as follows:Then I tried
drupalBackup.sh default /home/htdocs/ssdev/sites
which outputs** Error with specified install: Site settings file '/home/htdocs/ssdev/sites/default/sites/default/settings.php' does not exist
Respond to: nonzero (at) gmailtodd
Tue, 09/22/2009 - 10:30
Permalink
The 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....
Anonymous (not verified)
Wed, 07/14/2010 - 10:28
Permalink
drush
Check out drush.
todd
Tue, 08/24/2010 - 23:51
Permalink
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.
Anonymous (not verified)
Sun, 12/19/2010 - 17:31
Permalink
nicely done
Many thanks for making these available - they have made many administrative tasks easier, and I appreciate the "one installation per site" philosophy (as an admin trying to migrate an inherited Aegir installation to single-site installs, the multi-site issue one I've been frustrated by). I do have a rookie question: how do you deal with automation of the scripts, particularly with cron? I've been trying to get drupalRunCron.sh to run as a cron job (and plan to use the backup scripts, too, at some point) but the script never actually hits the cron pages. It runs, but my system email just contains the last line of output, "** Done." I suspect this is due to cron not being able to make use of the environment variables/path settings required by the script library (I've tried it with my personal crontab, and my account has these settings, but no luck) . Any tips? Thanks again.
todd
Wed, 01/19/2011 - 15:12
Permalink
It sounds as if the cron
It sounds as if the cron system is running w/o running the necessary bash setup files and thus cannot find the drupal installations. Try using the optional last parameter on the drupalRunCron.sh command line -- the one that sets the Drupal installation group root dir. After doing that see if the script doesn't see your set of installations.
cheers
todd
Sun, 02/20/2011 - 11:32
Permalink
Scripts Broken because of Git usage.
The Drupal Script Library is currently broken because of the migration of the Drupal projects (core and contributed projects) from CVS to Git.
I will be dealing with this when I get a chance.
todd
Sat, 05/28/2011 - 12:33
Permalink
Update to CVS -> Git Migration
I have checked in the first wave of commits to make these scripts work with git. The scripts now do a git checkout of Drupal and contributed modules. Updates also work. Things that are still broken are denoted with TODOs.
todd
Wed, 06/22/2011 - 13:48
Permalink
See post on migration from CVS to Git
Please see the post on converting the Drupal Script Library to use Git.
todd
Fri, 07/27/2012 - 01:54
Permalink
See post on migration from Git to Drush
Moving on to using Drush to download modules. The Drupal Script Library still provides value add, however.
See: http://toddgee.com/node/75
Anonymous (not verified)
Tue, 08/09/2011 - 19:49
Permalink
Sctipts Download
Is there a way to download the entire set of Drupal scripts?
todd
Thu, 09/08/2011 - 23:29
Permalink
Sure. The best way is to to
Sure. The best way is to to use the svn command above.
I suppose you could download them one-by-one via http (or use the firefox plugin like 'DownloadThemAll'). You could even write a bunch of 'wget' commands....