You are here

function backup_migrate_menu in Backup and Migrate 5.2

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 backup_migrate.module \backup_migrate_menu()
  4. 6.3 backup_migrate.module \backup_migrate_menu()
  5. 6 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 64
Create (manually or scheduled) and restore backups of your Drupal MySQL database with an option to exclude table data (e.g. cache_*)

Code

function backup_migrate_menu($may_cache) {
  $items = array();
  if ($may_cache) {
    $items[] = array(
      'path' => 'admin/content/backup_migrate',
      'title' => t('Backup and Migrate'),
      'description' => t('Backup/restore your database or migrate data to or from another Drupal site.'),
      'callback' => 'backup_migrate_ui_manual_backup',
      'access' => user_access('perform backup'),
      'type' => MENU_NORMAL_ITEM,
    );
    $items[] = array(
      'path' => 'admin/content/backup_migrate/export',
      'title' => t('Backup'),
      'description' => t('Backup the database.'),
      'callback' => 'backup_migrate_menu_callback',
      'callback arguments' => array(
        '',
        'backup_migrate_ui_manual_backup',
        TRUE,
      ),
      'access' => user_access('perform backup'),
      'weight' => 0,
      'type' => MENU_DEFAULT_LOCAL_TASK,
    );
    $items[] = array(
      'path' => 'admin/content/backup_migrate/restore',
      'title' => t('Restore'),
      'description' => t('Restore the database from a previous backup'),
      'callback' => 'backup_migrate_menu_callback',
      'callback arguments' => array(
        '',
        'backup_migrate_ui_manual_restore',
        TRUE,
      ),
      'access' => user_access('restore from backup'),
      'weight' => 1,
      'type' => MENU_LOCAL_TASK,
    );
    $items[] = array(
      'path' => 'admin/content/backup_migrate/destination',
      'title' => t('Destinations'),
      'description' => t('List the available backup destinations.'),
      'callback' => 'backup_migrate_menu_callback',
      'callback arguments' => array(
        'destinations',
        'backup_migrate_ui_destination_display_destinations',
        TRUE,
      ),
      'access' => user_access('access backup files'),
      'weight' => 2,
      'type' => MENU_LOCAL_TASK,
    );
    $items[] = array(
      'path' => 'admin/content/backup_migrate/destination/list',
      'title' => t('List Destinations'),
      'weight' => 1,
      'type' => MENU_DEFAULT_LOCAL_TASK,
    );
    $items[] = array(
      'path' => 'admin/content/backup_migrate/destination/add',
      'title' => t('Create Destination'),
      'callback' => 'backup_migrate_menu_callback',
      'callback arguments' => array(
        'destinations',
        'backup_migrate_ui_destination_create',
        TRUE,
      ),
      'access' => user_access('administer backup and migrate'),
      'weight' => 2,
      'type' => MENU_LOCAL_TASK,
    );
    $items[] = array(
      'path' => 'admin/content/backup_migrate/destination/files',
      'title' => t('Destination Files'),
      'callback' => 'backup_migrate_menu_callback',
      'callback arguments' => array(
        'destinations',
        'backup_migrate_ui_destination_display_files',
        TRUE,
      ),
      'access' => user_access('access backup files'),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/content/backup_migrate/destination/delete',
      'title' => t('Delete Destination'),
      'callback' => 'backup_migrate_menu_callback',
      'callback arguments' => array(
        'destinations',
        'backup_migrate_ui_destination_delete_destination',
        TRUE,
      ),
      'access' => user_access('administer backup and migrate'),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/content/backup_migrate/destination/configure',
      'title' => t('Configure Destination'),
      'callback' => 'backup_migrate_menu_callback',
      'callback arguments' => array(
        'destinations',
        'backup_migrate_ui_destination_configure',
        TRUE,
      ),
      'access' => user_access('administer backup and migrate'),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/content/backup_migrate/destination/deletefile',
      'title' => t('Delete File'),
      'description' => t('Delete a backup file'),
      'callback' => 'backup_migrate_menu_callback',
      'callback arguments' => array(
        'destinations',
        'backup_migrate_ui_destination_delete_file',
        TRUE,
      ),
      'access' => user_access('delete backup files'),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/content/backup_migrate/destination/restorefile',
      'title' => t('Restore from backup'),
      'description' => t('Restore database from a backup file on the server'),
      'callback' => 'backup_migrate_menu_callback',
      'callback arguments' => array(
        'destinations',
        'backup_migrate_ui_destination_restore_file',
        TRUE,
      ),
      'access' => user_access('restore from backup'),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/content/backup_migrate/destination/downloadfile',
      'title' => t('Download File'),
      'description' => t('Download a backup file'),
      'callback' => 'backup_migrate_menu_callback',
      'callback arguments' => array(
        'destinations',
        'backup_migrate_ui_destination_download_file',
        TRUE,
      ),
      'access' => user_access('access backup files'),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/content/backup_migrate/schedule',
      'title' => t('Schedule'),
      'description' => t('View existing schedules'),
      'callback' => 'backup_migrate_menu_callback',
      'callback arguments' => array(
        'schedules',
        'backup_migrate_ui_schedule_display_schedules',
        TRUE,
      ),
      'access' => user_access('administer backup and migrate'),
      'weight' => 3,
      'type' => MENU_LOCAL_TASK,
    );
    $items[] = array(
      'path' => 'admin/content/backup_migrate/schedule/list',
      'title' => t('Schedule List'),
      'weight' => 1,
      'type' => MENU_DEFAULT_LOCAL_TASK,
    );
    $items[] = array(
      'path' => 'admin/content/backup_migrate/schedule/add',
      'title' => t('Create Schedule'),
      'description' => t('View existing schedules'),
      'callback' => 'backup_migrate_menu_callback',
      'callback arguments' => array(
        'schedules',
        'backup_migrate_ui_schedule_create',
        TRUE,
      ),
      'access' => user_access('administer backup and migrate'),
      'weight' => 2,
      'type' => MENU_LOCAL_TASK,
    );
    $items[] = array(
      'path' => 'admin/content/backup_migrate/schedule/delete',
      'title' => t('Delete Schedule'),
      'description' => t('View existing schedules'),
      'callback' => 'backup_migrate_menu_callback',
      'callback arguments' => array(
        'schedules',
        'backup_migrate_ui_schedule_delete',
        TRUE,
      ),
      'access' => user_access('administer backup and migrate'),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/content/backup_migrate/schedule/configure',
      'title' => t('Edit Schedule'),
      'description' => t('View existing schedules'),
      'callback' => 'backup_migrate_menu_callback',
      'callback arguments' => array(
        'schedules',
        'backup_migrate_ui_schedule_configure',
        TRUE,
      ),
      'access' => user_access('administer backup and migrate'),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/content/backup_migrate/profile',
      'title' => t('Profiles'),
      'description' => t('View existing profiles'),
      'callback' => 'backup_migrate_menu_callback',
      'callback arguments' => array(
        'profiles',
        'backup_migrate_ui_profile_display_profiles',
        TRUE,
      ),
      'access' => user_access('administer backup and migrate'),
      'weight' => 3,
      'type' => MENU_LOCAL_TASK,
    );
    $items[] = array(
      'path' => 'admin/content/backup_migrate/profile/list',
      'title' => t('Profile List'),
      'weight' => 1,
      'type' => MENU_DEFAULT_LOCAL_TASK,
    );
    $items[] = array(
      'path' => 'admin/content/backup_migrate/profile/add',
      'title' => t('Create Profile'),
      'description' => t('View existing profiles'),
      'callback' => 'backup_migrate_menu_callback',
      'callback arguments' => array(
        'profiles',
        'backup_migrate_ui_profile_create',
        TRUE,
      ),
      'access' => user_access('administer backup and migrate'),
      'weight' => 2,
      'type' => MENU_LOCAL_TASK,
    );
    $items[] = array(
      'path' => 'admin/content/backup_migrate/profile/delete',
      'title' => t('Delete Profile'),
      'description' => t('View existing profiles'),
      'callback' => 'backup_migrate_menu_callback',
      'callback arguments' => array(
        'profiles',
        'backup_migrate_ui_profile_delete',
        TRUE,
      ),
      'access' => user_access('administer backup and migrate'),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/content/backup_migrate/profile/configure',
      'title' => t('Edit Profile'),
      'description' => t('View existing profiles'),
      'callback' => 'backup_migrate_menu_callback',
      'callback arguments' => array(
        'profiles',
        'backup_migrate_ui_profile_configure',
        TRUE,
      ),
      'access' => user_access('administer backup and migrate'),
      'type' => MENU_CALLBACK,
    );
  }
  return $items;
}