Import your sites to Aegir in 8 easy steps
This is our standard recipe, useful when you need to import a site with some older Drupal core or some custom install profile (please see Hint #7 for custom profiles). When it is a site already running on the latest Drupal core (Pressflow or vanilla Drupal), available also as a default platform in your Aegir instance, there is no need to import it as a platform – instead start with step #4 and then remember only to set correct permissions on the files uploaded to the newly created site, as explained in step #2. Of course you still need to upload any modules and themes you had in the sites/all platform level.
1Upload or rsync full drupal root of your site to the static/custom/name directory. The custom/name is an example path only – it can be anything inside the /static directory.
2Chmod everything with command: $ chmod -R 775 static/custom/name and files only with: $ chmod -R 777 static/custom/name/sites/default/files/*
3Add platform in Aegir using full system path of static/custom/name so it will be (in this case) /data/disk/USER/static/custom/name
4Create a new, blank site in the new platform with your final domain like your-domain.com – don’t use any other temporary (sub)domain in this step.
5Move all files from sites/default/files to sites/domain/files with: cp -af sites/default/files/* sites/domain/files/
6Import your uploaded database (or use backup_migrate module) with: $ cd static/custom/name/sites/domain $ drush sqlc < /data/disk/USER/static/domain.sql $ drush cc all
7Rename the site (using Migrate task) twice – first to some temporary subdomain like custom-name.your-domain.com and then back to your final domain your-domain.com
8Finally, re-verify the site in Aegir. Now all paths to images should be properly rewritten both in the ‘files’ table and in the ‘node_revision’ table. Done!
!Hint nr 1: Replace USER with your Aegir Octopus system (not SSH/FTP) username. Your Aegir system username is the same as your FTP/SSH username, minus .ftp, so if your FTP/SSH username is ‘12345678.ftp’ then your Aegir system username is ‘12345678’. NOTE: you don’t have an access to your Aegir system user, it is mentioned here only to help you using correct path.
!Hint nr 2: If your site have been installed as Drupal multisite on your previous server (so not in the sites/default), then you have to upload its files and optionally themes and modules existing in the sites/your-domain.com after you created an empty site in the step #4 above. Please don’t upload sites/your-domain.com directory in step #1, you need to upload it in step #5 and then: $ chmod -R 777 static/custom/name/sites/your-domain.com/files/*
!Hint nr 3: You will see some errors when using ‘chmod’ command on the files directory. This is expected, because your FTP/SSH user is not an owner of this directory, yet, you still can (and should) change permissions as recommended in our how-to above. It is fine to see some errors for subdirectories you don’t own, because the ‘chmod’ command will still set correct permissions for files uploaded by you.
!Hint nr 4: If you are importing site developed in your local environment with name like ‘domain.local’, it is possible that some modules will expect ‘domain.local’ in the include path for some included files, and it will cause fatal errors if the path doesn’t exist on the server where you are importing the site and its database. The solution is to create the site with name used in your local environment – like ‘domain.local’ – in step #4 initially, and rename it to your new expected domain in step #7.
!Hint nr 5: Make sure you don’t have prefixes for your tables in your database dump file before importing it, since Aegir doesn’t support db prefixes and/or tables shared between sites. Simply replace any ‘prefix_tablename’ with ‘tablename’ in the database dump file. Also remember that it must include the DROP lines, like ‘DROP TABLE IF EXISTS `access`;’ etc.
!Hint nr 6: When your site’s files directory is big (500MB or more) and you have root access on your server, always symlink large files directory. Aegir by default creates full, compressed archive from entire sites/domain.name directory on every Clone, Migrate, and of course Backup task, so it will fail on servers without enough RAM and CPU power to handle this before PHP-CLI or SQL connection will timeout. It is a known issue and there are plans to move files directory away from sites/domain.name by default and only symlink it there, but it is not implemented yet, so you need to use manual workaround for large files directories and move them away, anywhere in the tree, for example to /data/disk/USER/static/domain_files and then ln -s /data/disk/USER/static/domain_files /path/to/platform/sites/domain.name/files. If you are on the hosted Aegir without root access, contact us to have the files directory symlinked, as explained above.
!Hint nr 7: When your imported site is based on some custom install profile not available in platforms installed by default, plus it is vanilla Drupal core and not Pressflow, then you will be interested in our recipe for migrating the site between install profiles. Note however, that you can use this recipe easily only when you have full access to your Aegir system – which is possible either when it is hosted on your own server or on the Aegir Root Core option. Otherwise you need to simply replace the Drupal vanilla core with corresponding Pressflow version in step #1 above. Another option would be to create another custom, but Pressflow based platform, so you could use the recipe for migrating the site between install profiles even if you are using managed Aegir hosting.

Hi, I have built custom
Hi,
I have built custom Drupal 7 site, with tons of fancy modules + custom theme + lots of hard work. Now I uploaded it as a new site custom platform located /static/customname. Is there a way to have best of both worlds: to have Drupal 7 core (and those performance modules) updated with Octopus automated script and have site with custom modules, so the custom platform for this case is not suitable?
Thank you.
It is already done for you
Please read: http://omega8.cc/extra-modules-available-in-all-platforms-123
Wow!
Yes, they are already there! May I join your fanclub?
Ask Question