Migraine, a Drupal test/production migration and backup tool, presented by Noosphere Networks. By Andrew Shearer, http://shearersoftware.com/ Intended to update a live production site with configuration changes made on a test site, without disturbing production data such as content, comments, and user accounts. Reverse migration is also possible, copying production data to a test site without affecting ongoing site development on it. BEWARE: this is early alpha software. It has been used for several weeks on one Drupal site, but has not had outside testing. Be sure to have a backup saved through other means, and read the disclaimer of warranty at the bottom of this document. For more information and updates, see: http://shearersoftware.com/software/server-administration/migraine/ REQUIREMENTS Python 2.4 or higher, or Python 2.3 with added 'subprocess' module. MySQL 4 or higher. SETUP Configuration can be specified on the command line, but to avoid having to do so every time, create a config file and pass its name in the --config= parameter. In order for the usage examples below to work, please copy the migraine-example.ini file, rename it migraine.ini, and update it with your own settings. For the first run, you may have to adjust the config_tables or content_tables variables in the source code to add your own table names. Migraine will warn you when you try to run it if there are any such unknown tables. See comments within the source for guidance. Some kinds of CCK changes alter content schema in a way that makes the test server configuration incompatible with the prod server content. Migraine will attempt to detect and highlight the schema differences, but they must be manually resolved (either through MySQL commands, or through repeating the same CCK actions on the prod server). USAGE To back up test server: python migraine.py --dump-test --config=migraine.ini To back up prod server: python migraine.py --dump-prod --config=migraine.ini (Use --restore-test or --restore-prod to restore.) To migrate test to prod (preserving prod's content tables): python migraine.py --dump-test --config=migraine.ini python migraine.py --migrate-to-prod --config=migraine.ini To migrate prod to test (preserving test's config, but overwriting it with prod content): python migraine.py --dump-prod --config=migraine.ini python migraine.py --migrate-to-test --config=migraine.ini To test out one of these options, add the --no-action parameter. It shows you what would have happened, without actually doing anything (except for saving a temporary copy of the schema dumpfile during simulated migrations, for internal use in comparisons). Copyright (C) 2007 Andrew Shearer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA.