 modules/hosting/task.hosting.inc |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/modules/hosting/task.hosting.inc b/modules/hosting/task.hosting.inc
index cf5aac8..3040a00 100644
--- a/modules/hosting/task.hosting.inc
+++ b/modules/hosting/task.hosting.inc
@@ -103,6 +103,17 @@ function drush_hosting_task() {
 
     $output = drush_backend_invoke_args('provision-save', array('@' . $task->ref->hosting_name), $task->context_options, $mode);
   }
+
+  // On backup_delete, recreate the named context
+  if ($task->task_type === 'backup_delete') {
+    // XXX: we copy module_invoke_all() here because it doesn't pass by
+    // reference and it breaks under PHP 5.3
+    $hook = 'hosting_' . $task->ref->type . '_context_options';
+    foreach (module_implements($hook) as $module) {
+      $function = $module . '_' . $hook;
+      call_user_func($function, $task);
+    }
+  }
   // Run the actual command. Adding alias here to work aorund Drush API.
   $output = provision_backend_invoke($task->ref->hosting_name, 'provision-' . $task->task_type, $task->args, $task->options, $mode);
   drush_set_context('HOSTING_DRUSH_OUTPUT', $output);
