dboettger's Blog

Archive for the ‘AEgir’ Category

As we are decided to use the great AEgir hosting system for all upcoming Drupalprojects i needed to migrate some sites from standalone installations to our new Aegir hosting system.

First i needed to backup the tables in my mysql database. My database’s name was drupal ( not that good idea ) and i was using table prefixes ( this idea was even worse ­čśë ).
The tableprefix of the website was website_
Only the tables were exported, not the CREATE DATABASE!
After exporting the tables into the drupal.sql file i opened the file with a editor, searched for website_ and replaced it with an empty string.

I created the folder /var/aegir/drupal-website as user aegir on myaegirHost.

su - aegir
mkdir drupal-website

Then i copied all the content of the drupalfolder from my standalone drupalsystem to my aegirhost.

cd /var/www/drupal
scp -r * aegir@myaegirHost:/var/aegir/drupal-website

Then i needed to copy and import the mysql database.

Source host:
scp drupal.sql aegir@myaegirHost:/var/aegir/

Target host:
mysql -u root -p
CREATE DATABASE drupal;
GRANT ALL ON drupal.* TO 'drupal'@localhost IDENTIFIED BY 'drupal';
exit
mysql -u root -p -D drupal < drupal.sql

After the database and all the files has been created i created a new platform in Aegir called drupal-website and entered the folder /var/aegir/drupal-website.
Aegir then creates the new platform and imports all sites from the platform.

Then i migrated all the sites to another platform. The manually created database called drupal gets renamed to the Aegir – style site_NUMBER scheme.

If there are any missing modules for a single site (shown under the migration tab), it’s possible to add the modules on a per site base with drush.

su - aegir
cd /var/aegir/drupal-website/sites/website
/var/aegir/drush/drush.php dl modulename

After installing the missing modules it was still showing missing in the Aegir migration tab. I ignored that and clicked on the button migrate. After two minutes the site was moved to the new platform.

If u need any further assistance, don’t hesitate to contact me!

Greetings,

Dom

Advertisements

Tweets

Error: Twitter did not respond. Please wait a few minutes and refresh this page.

Advertisements