One of the most powerful features of Aegir is the way it can help you to upgrade large numbers of websites. You might have dozens of sites hosted on a drupal 6.12 codebase for example - but then the 6.13 release comes out with vital security fixes. Previously you'd have to go to each site, back up the files and database, upload the new codebase, run update.php, check everything worked and then onto the next site.
With Aegir you simply click a button - and it handles everything. This is called 'migrating' sites in Aegir terminology, because it might be used in more cases than simply upgrading the main codebase. For example you may have different 'platforms' with different mixes of contrib modules and themes and charge clients for the basic, advanced and gold packages. When they choose to move from basic to advance, you simply migrate their site.
Here's how migrating works:
Backup the Site
In the Aegir web interface click on the website that you want to migrate, then select the 'run' button for the 'Backup' task under the Task column in the center of the page. Aegir will process the task at the next cron run. Wait for the task to turn green (after a few screen refreshes) before moving on.
Checking and Updating the Target Codebase
Select the 'run' button for the 'Migrate' task under the Task column in the center of the page. On the panel which appears, under the platform you wish to migrate to, click the "Compare platforms" link.
Aegir will autodetect which other platforms are compatible, and are possible to migrate to. It will list all the other packages (modules, themes, install profiles) that the site uses, and show which of these are present or missing, or out of date in each platform.
If you happen to have some modules in the site's modules directory and those are therefore site-specific only (not sites/all/modules), Aegir will still report them as missing on the new platform. Once you migrate, all of these site-specific modules will be copied as well so you don't need to install them via Drush.
You need to make sure the relevant packages are present and up to date on the platform you want to migrate to.
This has to be done from the command line, using drush. In a shell session, within the codebase of the platform you are targetting simply issue commands like:
/var/aegir/drush/drush.php dl modulename1 modulename2 themename1
You can put as many package names as you like on one line. This will download the latest compatible recommended version of each package from drupal.org. If you want to get more specific about which version you install, see the drush documentation.
If you're working through the list of modules that are shown on the Aegir Migrate screen don't be surprised if some of them don't seem to be available via drush - they might be sub-modules of other modules, and will have been downloaded as part of that package.
Re-verify the target codebase
If you've had to download extra packages to the target platform, you need to visit the screen for that platform in Aegir, and choose the tab 'verify' and click the button to re-verify the site. This updates Aegir's information about all the packages.
Then go back to the site's Migrate screen.
Migrate the Site
Now you can select the radio button for the platform you want to migrate to, and click 'Migrate'. Aegir will add the task to the queue, and process it on the next cron run.
It will now move the site/example.com directory to the other codebase, and run update.php for you. When this is done, visit the new site
Troubleshooting
The first thing to do is to clear the caches on the site (admin_menu has a very handy link for this, as does devel module).
If imagecache images are still not appearing properly, visit the imagecache settings page and select to rebuild all the images.
NOTES:
- A contribution about moving/cloning sites from one server to another has been moved here: http://groups.drupal.org/node/25127
- The Site Migration feature is disabled by default in Aegir. You must go to admin/hosting/features and enable Site Migration in order to be presented with the option to Migrate in the site task list.