DMSAK — Drupal Multi-Site Admin Kit

DMSAK is a set of tools to manage multi-site Drupal installs. It has scripts to create and delete webs, update the codebase and modules, create and restore backups and others. It supports various Drupal code base versions simultaneously at the same server and allows code tweaking and customization only on specific webs.

Features

  • Ease of maintenance;
  • Quick backup and restore operation;
  • Move webs between servers easily;
  • Allows code base tweaking and customization only on specific webs;
  • Customize .htaccess and other settings per web;
  • Keeps sites' media and added functions completely isolated and contained;
  • Simplifies hosting webs using multiple versions of Drupal;
  • Secure and flexible setup.

Scripts included

  • install-drupal.sh — Install a Drupal code base
  • update-drupal.sh — Update Drupal code base
  • install-module.sh — Install module
  • update-module.sh — Update module
  • install-theme.sh — Install theme
  • update-theme.sh — Update theme
  • create-web.sh — Create a web site
  • remove-web.sh — Remove a web site
  • backup-web.sh — Backup web
  • restore-web.sh — Restore web from backup

Download

Get the toolkit from DMSAK's repository at GitHub.

Folders structure

Quick start guide

Start by customizing DMSAK for your setup:


# Copy dmsak-example.cfg to dmsak.cfg and edit the defaults.
DRUPAL_VERSION="6" # The default version of Drupal to use.
DRUPAL_DIR="/var/lib" # The directory where Drupal codebase and modules will be installed.
WEBS_DIR="/var/www" # The directory where the web directories are located.
BACKUP_DIR="/root" # Where to store backups.
TEMP_DIR="/tmp" # Directory for temporary files.
DB_HOST="localhost" # Database host.
DB_USER="root" # Database username.
DB_PASS="" # Database password (leave empty to enter password interactively).

Next, install Drupal and required modules:


install-drupal.sh ../drupal-6.20.tar.gz
install-module.sh ../views-6.x-2.8.tar.gz
install-module.sh ../cck-6.x-2.9.tar.gz
...

Create a web:


# Remember to create the vhost in Apache.
create-web.sh example.com

Now you are ready to start building your new website!

To backup and restore a web:


# Backing up.
backup-web.sh example.com
# You can also use this to move or copy a site to a different server, but remember to install Drupal and required modules first.
restore-web.sh -b example.com-201102101530-backup.tar.gz example.com

 

TODO

  • Use wget to fetch tarballs from the web;
  • Restore webs backups to a different domain name;
  • Create extra soft link at Drupal's "sites" folder for temporary hostname;
  • Fix files dir path length http://groups.drupal.org/node/10211