diff -ru hosting.cvs/site/hosting_site.module hosting/site/hosting_site.module
--- hosting.cvs/site/hosting_site.module	2008-10-17 16:16:59.000000000 -0400
+++ hosting/site/hosting_site.module	2008-10-17 16:17:19.000000000 -0400
@@ -427,6 +427,18 @@
   }
 }
 
+/**
+ *
+ */
+function hosting_site_check_incoming($node) {
+  //vérifier le nom des fichiers dans ../incoming
+  $new_files = file_scan_directory(PROVISION_INCOMING_PATH, $node->title.'.*\.tar\.gz$');
+
+  if (sizeof($new_files) >= 1 ) {
+    drupal_set_message("New backup file will be available in one minute or less.");
+    hosting_add_task($node->nid, 'incoming');
+  }
+}
 
 /**
  * Hide the delete button on site nodes
Seulement dans hosting/stats: CVS
Seulement dans hosting/task: CVS
diff -ru hosting.cvs/task/hosting_task.module hosting/task/hosting_task.module
--- hosting.cvs/task/hosting_task.module	2008-10-17 16:16:59.000000000 -0400
+++ hosting/task/hosting_task.module	2008-10-17 16:22:59.000000000 -0400
@@ -26,6 +26,17 @@
           
         }
      }
+
+     $items[] = array (
+            'path' => 'node/' . arg(1) . '/task_import',
+            'title' => 'Import',
+            'description' => 'Import an external backup file.',
+            'callback' => 'drupal_get_form',
+            'callback arguments' => array('hosting_task_import_backup_form', $node),
+            'access' => user_access('can schedule tasks'),
+            'type' => MENU_LOCAL_TASK,
+            'weight' => 10, 
+     );
   }
   return $items;
 }
@@ -141,6 +152,7 @@
 }
 
 function hosting_task_restore_form($node) {
+  hosting_site_check_incoming($node);
   $list = hosting_site_backup_list($node->nid);
   if (sizeof($list)) {
     $form['bid'] = array(
@@ -476,12 +488,30 @@
 }
 
 /**
+ * Import backup form.
+ */
+function hosting_task_import_backup_form($node) {
+  $form['nid'] = array('#type' => 'value', '#value' => $node->nid);
+  $form['incoming'] = array('#type' => 'fieldset', '#title' => t('Incoming'), '#weight' => 1);
+  $form['incoming']['file_upload'] = array (
+      '#type' => 'file',
+      '#title' => t('Attach backup file'),
+      '#size' => 40,
+  );
+  $form['incoming']['submit'] = array (
+      '#type' => 'submit',
+      '#value' => t('Save'),
+  );
+  $form['#attributes']['enctype'] = 'multipart/form-data';
+  return $form;
+}
+
+/**
  * Display list of tasks
  */
 function hosting_task_list($filter_by = null, $filter_value = null) {
   $args[] = 'task';
   $cond = '';
-
   if ($filter_by && $filter_value) {
     $cond = ' AND t.' . $filter_by . ' = %d';
     $args[] = $filter_value;
@@ -505,3 +535,23 @@
   return theme('table', array(t('Task'), t('Status'), t('Created')), $rows);
 
 }
+
+/**
+ * Import backup form validation.
+ */
+function hosting_task_import_backup_form_validate($form_id, $form_values) {
+  if (!$file = file_check_upload('file_upload')) {
+    form_set_error('file_upload', t('A error occur during the upload of the backup.'));
+   if (!preg_match("/.*\.tar\.gz/", $file->filename)) {
+      form_set_error('file_upload', t('Only tar.gz can be upload with this form.'));
+    }
+  }
+}
+
+function hosting_task_import_backup_form_submit($form_id, $form_values) {
+  move_uploaded_file($file->filepath, PROVISION_INCOMING_PATH ."/". $file->filename);
+  hosting_add_task($form_values['nid'], 'incoming');
+  drupal_set_message(t('You have successfully uploaded your backup. A new task was created to process it.'));
+
+  return 'node/' . $form_values['nid'];
+}
