Importing a single site from an existing Aegir system
- 1. Copy backups
- 2. Drush provision commands
- 3. Verify the Platform
- 4. Caveats
- 5. Setting a Non-Default Install Profile
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.
1. 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. Simply make a new backup of the site in the old system, and rerun the rsync command.
2. 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 --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.
4. Caveats
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
- 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.