BOA: Clone a Drupal 7 Site Manually

It occurs normally many times that we want to clone a site on Barracuda-Octopus-Aegir (BOA) hosting. But sometimes Aegir UI may fail to perform this task for some reasons. It may be due to some failure on platform itself that prevents us cloning the site using Aegir UI. In this article I am sharing the steps I followed that allowed me to successfully clone a site on BOA by Omega8 in a similar situation.

Assuming that you want to clone a site to Follow the steps given below to perform the cloning manually.

  1. Create a brand new site on the platform using Aegir UI. You have to choose same Drupal installation profile as original site that you are going to clone, it is very important or you will fail to create the clone successfully.
  2. Open terminal and login to server over SSH. Then move to newly created site directory.1
    • cd static/<platform-dir>/site/
  3. Remove all existing files from the new site's file directories.
    • rm -rf files/*
    • rm -rf private/*
  4. Now, copy all files, modules, libraries, themes, vendors, etc from original site to new one.
    • cp -af /data/disk/o1/static/<platform-dir>/sites/* ./files/
    • cp -af /data/disk/o1/static/<platform-dir>/sites/* ./libraries/
    • cp -af /data/disk/o1/static/<platform-dir>/sites/* ./modules/
    • cp -af /data/disk/o1/static/<platform-dir>/sites/* ./private
    • cp -af /data/disk/o1/static/<platform-dir>/sites/* ./themes/
    • cp -af /data/disk/o1/static/<platform-dir>/sites/* ./vendor/
  5. Copy the database of original site to new one.
    • drush sql-dump | drush sqlc
  6. Now you need to rename the site twice using Migrate task on Aegir UI on same platform. First to a temporary domain, then back to original domain. It will correct many path name related issues within site. Otherwise you may get errors while accessing the site.

  1. Replace with correct platform directory name.