If you need to import a site from an existing Aegir system, this can be done from an Aegir site backup.
- 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.
1. Copy backups
First log into the new server via ssh - switch to the aegir user. Create a temporary directory somewhere, for example:
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 firstname.lastname@example.org:/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. Simply make a new backup of the site in the old system, and rerun the rsync command.
2. Create the site context and deploy the backup
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 --db_server=@server_localhost --client_name=admin
Then run the provision-deploy:
drush @example.com provision-deploy /var/aegir/tmp/migrate/example.com-2010-11-11.tar.gz
Note: if you receive an error, you might also try adding the site to your new Aegir platform (using the same platform and site name, of course). Then run the provision-deploy again.
3. 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.
The provision-save command will assume the database server is the same as the master server and that you are not using any install profile. So if your DB lives in another server or if you are using an install profile like openatrium you will probably need to edit the file created at /var/aegir/.drush/example.com.alias.drushrc.php
5. Setting a Non-Default Install Profile
If you are using a non-default install profile, you may want to specify your install profile by adding
--profile=profilemachinename to the
drush provision-save command above.
Using the example above but using an install profile for Open Atrium, the command would look like:
drush provision-save @example.com --context_type=site --platform=@platform_d6 --profile=openatrium --uri=example.com
|Referenced by||Last post||Author|
|Simple Script for Bulk Importing into a New Aegir Install||Tue, 05/24/2011 - 20:10||that0n3guy|
|Infinite Recursion on Site Import||Tue, 01/25/2011 - 20:15||Josh Benner|