You are here

function action_backup_migrate_backup in Backup and Migrate 5.2

Same name and namespace in other branches
  1. 5 backup_migrate.module \action_backup_migrate_backup()
  2. 6 backup_migrate.module \action_backup_migrate_backup()

Action to backup the drupal site. Requires actions.module.

File

./backup_migrate.module, line 649
Create (manually or scheduled) and restore backups of your Drupal MySQL database with an option to exclude table data (e.g. cache_*)

Code

function action_backup_migrate_backup($op, $edit = array()) {
  switch ($op) {
    case 'do':
      _backup_migrate_backup_with_defaults();
      watchdog('action', t('Backed up database'));
      break;
    case 'metadata':
      return array(
        'description' => t('Backup the database with the default settings'),
        'type' => t('Backup and Migrate'),
        'batchable' => TRUE,
        'configurable' => FALSE,
      );

    // Return an HTML config form for the action.
    case 'form':
      return '';

    // Validate the HTML form.
    case 'validate':
      return TRUE;

    // Process the HTML form to store configuration.
    case 'submit':
      return '';
  }
}