Index: demo.admin.inc
===================================================================
--- demo.admin.inc	(revision 251)
+++ demo.admin.inc	(working copy)
@@ -193,7 +193,7 @@ function demo_dump_submit($form_id, $val
     drupal_set_message(t('@engine support not implemented yet.', array('@engine' => ucfirst($engine))), 'error');
   }
 
-  drupal_goto('admin/build/demo/manage');
+  return 'admin/build/demo/manage';
 }
 
 function demo_reset_confirm() {
Index: demo.module
===================================================================
--- demo.module	(revision 251)
+++ demo.module	(working copy)
@@ -145,3 +145,29 @@ function demo_cron() {
   }
 }
 
+/**
+ * Implementation of hook_form_alter().
+ */
+function demo_form_alter($form_id, &$form) {
+  if ($form_id == 'update_script_selection_form') {
+    $form['demo'] = array(
+      '#type' => 'checkbox',
+      '#title' => 'Create demo snapshot before updating',
+      '#default_value' => 1,
+      '#weight' => -10,
+    );
+    $form['#submit'] = array('demo_update_script_selection_form_submit' => array()) + (array)$form['#submit'];
+  }
+}
+
+/**
+ * FAPI callback to create a snapshot before updating modules.
+ */
+function demo_update_script_selection_form_submit($form_id, &$form_values) {
+  if (!empty($form_values['demo'])) {
+    require_once drupal_get_path('module', 'demo') . '/demo.admin.inc';
+    $values['filename'] = 'pre-update-'. date('ymd-Hi');
+    demo_dump($form_id, $values);
+  }
+}
+
