diff --git a/platform/clone.provision.inc b/platform/clone.provision.inc
index 5a1c2a8..5a93699 100644
--- a/platform/clone.provision.inc
+++ b/platform/clone.provision.inc
@@ -13,29 +13,38 @@
  * Make sure we have a valid site being cloned, and that the file being cloned from exists
  */
 function drush_provision_drupal_provision_clone_validate($new_uri = null, $platform = null) {
+  if (d()->type == 'site') {
   drush_bootstrap(DRUSH_BOOTSTRAP_DRUPAL_SITE);
+  }
 }
 
 /**
  * Make a backup before making any changes, and add extract the file we are restoring from
  */
 function drush_provision_drupal_pre_provision_clone($new_uri, $platform = null) {
+  if (d()->type == 'site') {
   drush_invoke('provision-backup');
+  }
 }
 
 /**
  * Remove the extracted site directory
  */
 function drush_provision_drupal_pre_provision_clone_rollback($new_uri, $platform = null) {
+  if (d()->type == 'site') {
   $success =  provision_file()->unlink(drush_get_option('backup_file'))
     ->succeed('Removed unused clone site package')
     ->fail('Could not remove unused clone site package');
+  }
 }
 
 /**
  * Switch the clone directories around now that we have the new db installed
  */
-function drush_provision_drupal_provision_clone($new_uri, $platform = null) {
+function drush_provision_drupal_provision_clone($new_name, $platform = null) {
+    print_r(d());
+  if (d()->type == 'site') {
+    $new_uri = $new_name;
   drush_set_option('old_platform', d()->platform->name);
 
   $options = d()->options;
@@ -70,5 +79,60 @@ function drush_provision_drupal_provision_clone($new_uri, $platform = null) {
   if (!drush_get_error()) {
     provision_backend_invoke($new_uri, 'provision-verify');
   }
+  }
+  elseif (d()->type == 'platform') {
+    // TODO filter $new_name for invalid chars
+    $new_platform_name = $new_name;
+    $old_platform_dir = d()->root;
+    $platforms_root = dirname($old_platform_dir);
+    $new_platform_dir = $platforms_root . '/' . $new_platform_name;
+
+    // TODO check that $new_platform_dir does not already exist
+
+    $options = d()->options;
+    drush_log(print_r($options, 1), 'debug');
+    $options['root'] = $new_platform_dir;
+    $options['makefile'] = '';  // todo: not sure if we want this to be empty
+    $options['#name'] = '';
+    // todo: add option for different server
+    drush_log(print_r($options, 1), 'debug');
+
+    // todo: copied preg_replace from hosting_platform_insert(), could we generalise that code?
+    $platform_alias = '@platform_' . preg_replace("/[!\W]/", "", $new_platform_name);
+    //drush_set_option('new_platform_alias', $platform_alias);
+
+    drush_backend_invoke_args('provision-save', array($platform_alias), $options);
+
+    drush_log("Cloning platform from $old_platform_dir to $new_platform_dir", 'info');
+    if (1) { // if NOT regenerate from makefile option is passed
+      // Starting with rsync as plain old 'cp' has not exclude options
+      // rsync -avv --exclude sites $old_platform_dir/ $new_platform_dir;
+      // mkdir $new_platform_dir/sites/;
+      // rsync -avv $old_platform_dir/sites/all $new_platform_dir/sites/;
+      // rsync -avv $old_platform_dir/sites/default $new_platform_dir/sites/;
+      // todo: or should we use drush_core_call_rsync() here???
+      drush_shell_exec('rsync -avv --exclude sites %s/ %s', $old_platform_dir, $new_platform_dir);
+      drush_mkdir($new_platform_dir . '/sites/');
+      drush_shell_exec('rsync -avv %s %s', $old_platform_dir . '/sites/all', $new_platform_dir . '/sites/');
+      drush_shell_exec('rsync -avv %s %s', $old_platform_dir . '/sites/default', $new_platform_dir . '/sites/');
+    }
+
+    provision_backend_invoke('@hostmaster', 'hosting-import', array($platform_alias));
+
+    if (!drush_get_error()) {
+      provision_backend_invoke($platform_alias, 'provision-verify');
+    }
+  }
+}
 
+/**
+ *
+ */
+/*
+function drush_provision_drupal_post_provision_clone($new_uri, $platform = null) {
+  if (d()->type == 'platform') {
+    $platform_alias = drush_get_option('new_platform_alias');
+    provision_backend_invoke('@hostmaster', 'hosting-import', array($platform_alias));
+  }
 }
+ */
diff --git a/platform/provision_drupal.drush.inc b/platform/provision_drupal.drush.inc
index aac29dd..0af6e4e 100644
--- a/platform/provision_drupal.drush.inc
+++ b/platform/provision_drupal.drush.inc
@@ -338,6 +338,7 @@ function _provision_find_profiles() {
 
 function provision_drupal_find_sites() {
   if ($dir = opendir("./sites")) {
+    $sites = array();
     while (FALSE !== ($subdir = readdir($dir))) {
       // skip internal directory pointers
       if ($subdir != '.' && $subdir != '..') {
diff --git a/provision.drush.inc b/provision.drush.inc
index 7e1d22b..25a1245 100644
--- a/provision.drush.inc
+++ b/provision.drush.inc
@@ -189,6 +189,7 @@ function provision_drush_command() {
       '@platform_name' => dt('The Drush alias of the platform to clone the site onto.')),
     'examples' => array(
       'drush @site provision-clone @new_site @platform_name' => 'Clone the original site to the new site on a platform',
+      'drush @platform provision-clone @new_platform' => 'Clone the original platfomr to the a new platform',
     ),
     'bootstrap' => DRUSH_BOOTSTRAP_DRUPAL_ROOT
   );
