Import from an existing Aegir system
If you need to import a site from an existing Aegir system, this can be done from an Aegir site backup.
Requirements:
- New Aegir version 0.4 alpha15 or later.
- Access to Aegir backups from the old server.
- A platform set up and verified that matches the platform on the old Aegir server.
Copy backups
First log into the new server via ssh - 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 new 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
. Replace with php /var/aegir/drush/drush.php
if needed.
Pay attention to these two commands, they require modification to match the name of the site, the alias of the platform, and the name of the backup archive. 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
The final step is to import the site into Aegir. This is easily done by logging into the Aegir front-end and verifying the platform, which then will trigger an import task for the new site.
- Login or register to post comments
- Print entire section
- Talk
#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.