Import from an existing Aegir system

Tagged:

If you need to import a site from an existing Aegir system, this can be done from an Aegir site backup.

Requirements:

  1. New Aegir version 0.4 alpha15 or later.
  2. Access to Aegir backups from the old server.
  3. A platform set up and verified that matches the platform on the old Aegir server.

Copy backups

Connect with ssh to the new server and switch to the aegir user. Create a temporary directory somewhere, for example:

mkdir /var/aegir/tmp/migrate

Run a command to syncronize the new directory with the backups directory of the old Aegir hosting system. This command does the entire directory, but you may want to modify this if you have a lot of unneeded backups on the old system.

This command also assumes that you can shell into the other server as the aegir user. Modify as required.

rsync -aPv -e ssh aegir@old-server.com:/var/aegir/backups/* /var/aegir/tmp/migrate

Now you can re-run the above command just before you are going to migrate a site. This is handy if you have a lot of sites to migrate and each site requires attention. Simple make a backup of the site in the old system, and rerun the rsync command.

Drush provision commands

For brevity, I assume that drush can be executed as drush. Use php /var/aegir/drush/drush.php if needed.

Pay attention to these two commands, they require modification to match the name of the site and the name of the backup. These commands should each be on one line. You also need to know the platform alias. You can see all the platform aliases available by typing drush sa | grep platform.

First tell Aegir about the site, which creates a site alias.

drush provision-save @example.com --context_type=site --platform=@platform_d6 --uri=example.com

Then run the provision-deploy:

drush @example.com provision-deploy /var/aegir/tmp/migrate/example.com-2010-11-11.tar.gz

Verify the Platform

Now you can go into Aegir frontend and Verify the platform. Once this is done your site should be operational again.

#1

Misleading:

Starting with drupal 7, profile has to be specified at all times - otherwise aegis tries to set the drupal profile to the Drupal 6 default profile. They way it is explained here is misleading - as you might assume, that the standard profile of drupal 7 also is a default profile.