You are here

function backup_migrate_menu in Backup and Migrate 6

Same name and namespace in other branches
  1. 8.2 backup_migrate.module \backup_migrate_menu()
  2. 8.3 backup_migrate.module \backup_migrate_menu()
  3. 5.2 backup_migrate.module \backup_migrate_menu()
  4. 5 backup_migrate.module \backup_migrate_menu()
  5. 6.3 backup_migrate.module \backup_migrate_menu()
  6. 6.2 backup_migrate.module \backup_migrate_menu()
  7. 7.3 backup_migrate.module \backup_migrate_menu()
  8. 7.2 backup_migrate.module \backup_migrate_menu()

Implementation of hook_menu().

File

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

Code

function backup_migrate_menu() {
  $items = array();
  $items['admin/content/backup_migrate'] = array(
    'title' => 'Backup and Migrate',
    'description' => 'Backup/restore your database or migrate data to or from another Drupal site.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'backup_migrate_backup',
    ),
    'access arguments' => array(
      'perform backup',
    ),
    'type' => MENU_NORMAL_ITEM,
  );
  $items['admin/content/backup_migrate/export'] = array(
    'title' => 'Backup/Export DB',
    'description' => t('Backup the database.'),
    'weight' => 0,
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items['admin/content/backup_migrate/restore'] = array(
    'title' => 'Restore/Import DB',
    'description' => 'Restore the database from a previous backup',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'backup_migrate_restore',
    ),
    'access arguments' => array(
      'restore from backup',
    ),
    'weight' => 1,
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/content/backup_migrate/files'] = array(
    'title' => 'Saved Backups',
    'description' => 'View existing backup files',
    'page callback' => '_backup_migrate_list_files',
    'access arguments' => array(
      'access backup files',
    ),
    'weight' => 2,
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/content/backup_migrate/files/manual'] = array(
    'title' => 'Manual Backups',
    'page callback' => '_backup_migrate_list_files',
    'page arguments' => array(
      'manual',
    ),
    'access arguments' => array(
      'access backup files',
    ),
    'weight' => 1,
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items['admin/content/backup_migrate/files/scheduled'] = array(
    'title' => 'Scheduled Backups',
    'page callback' => '_backup_migrate_list_files',
    'page arguments' => array(
      'scheduled',
    ),
    'access arguments' => array(
      'access backup files',
    ),
    'weight' => 2,
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/content/backup_migrate/schedule'] = array(
    'title' => 'Backup Schedule',
    'description' => 'View existing backup files',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'backup_migrate_schedule',
    ),
    'access arguments' => array(
      'access backup files',
    ),
    'weight' => 3,
    'type' => MENU_LOCAL_TASK,
  );
  $items['admin/content/backup_migrate/restorefile'] = array(
    'title' => 'restore from backup',
    'description' => 'Restore database from a backup file on the server',
    'page callback' => '_backup_migrate_restore_from_server',
    'access arguments' => array(
      'restore from backup',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['admin/content/backup_migrate/delete'] = array(
    'title' => 'Delete File',
    'description' => 'Delete a backup file',
    'page callback' => '_backup_migrate_delete',
    'access arguments' => array(
      'delete backup files',
    ),
    'type' => MENU_CALLBACK,
  );
  return $items;
}