You are here

function backup_migrate_help in Backup and Migrate 7.3

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

Implements hook_help().

1 call to backup_migrate_help()
backup_migrate_help_section in ./backup_migrate.module
Helper function for HOOK_help() to create parts of the help page.

File

./backup_migrate.module, line 28
Backup and restore databases for Drupal.

Code

function backup_migrate_help($section, $arg) {
  $help = NULL;
  switch ($section) {
    case BACKUP_MIGRATE_MENU_PATH:
      $help = t('Use this form to run simple manual backups of your database and files.');
      break;
    case BACKUP_MIGRATE_MENU_PATH . '/export/advanced':
      $help = t('Use this form to run manual backups of your database and files with more advanced options. If you have any !profilelink saved you can load those settings. You can save any of the changes you make to these settings as a new settings profile.', array(
        "!profilelink" => user_access('administer backup and migrate') ? l(t('settings profiles'), BACKUP_MIGRATE_MENU_PATH . '/profile') : t('settings profiles'),
        '!restorelink' => user_access('restore from backup') ? l(t('restore feature'), BACKUP_MIGRATE_MENU_PATH . '/restore') : t('restore feature'),
        '!phpmyadminurl' => 'http://www.phpmyadmin.net',
      ));
      break;
    case BACKUP_MIGRATE_MENU_PATH . '/restore':
      $help = t('Upload a backup and migrate backup file. The restore function will not work with database dumps from other sources such as phpMyAdmin.');
      break;
    case BACKUP_MIGRATE_MENU_PATH . '/settings/destination':
      $help = t('Destinations are the places you can save your backup files to or them load from.');
      break;
    case BACKUP_MIGRATE_MENU_PATH . '/settings/source':
      $help = t('Sources are the things that can be backed up such as database or file directories.');
      break;
    case BACKUP_MIGRATE_MENU_PATH . '/settings/profile':
      $help = t('Profiles are saved backup settings. Profiles store your table exclusion settings as well as your backup file name, compression and timestamp settings. You can use profiles in !schedulelink and for !manuallink.', array(
        '!schedulelink' => user_access('administer backup and migrate') ? l(t('schedules'), BACKUP_MIGRATE_MENU_PATH . '/schedule') : t('settings profiles'),
        '!manuallink' => user_access('perform backups') ? l(t('manual backups'), BACKUP_MIGRATE_MENU_PATH) : t('manual backups'),
      ));
      break;
    case BACKUP_MIGRATE_MENU_PATH . '/schedule':
      $help = t('Automatically backup up your database and files on a regular schedule using <a href="!cronurl">cron</a>.', array(
        '!cronurl' => 'http://drupal.org/cron',
      ));
      break;
    case BACKUP_MIGRATE_MENU_PATH . '/settings/import':
      $help = t('Import a settings profile, backup schedule, source or destination by pasting the export code into the textarea.', array(
        '!cronurl' => 'http://drupal.org/cron',
      ));
      break;
    case 'admin/advanced_help':

      // Help link on module list page (admin/modules/list) or advanced help
      // module (admin/advanced_help/backup_migrate), use $arg to see if it
      // is for this module.
      if ($arg[2] != 'backup_migrate') {
        break;
      }

    // Explicit fall-through.
    case 'admin/help#backup_migrate':

      // Assemble help page based on all strings above plus more.
      $help = t('Backup and Migrate makes the task of backing up your Drupal database and migrating data from one Drupal install to another easier. It provides a function to backup the entire database to file or download, and to restore from a previous backup. You can also schedule the backup operation. Compression of backup files is also supported.  The database backup files created with this module can be imported into this or any other Drupal installation with the !restorelink, or you can use a database tool such as <a href="!phpmyadminurl">phpMyAdmin</a> or the mysql command line command.', array(
        '!restorelink' => user_access('restore from backup') ? l(t('restore feature'), BACKUP_MIGRATE_MENU_PATH . '/restore') : t('restore feature'),
        '!phpmyadminurl' => 'http://www.phpmyadmin.net',
      ));
      $help = '<p>' . $help . '</p>';
      $help .= backup_migrate_help_section(t('Quick Backup Tab'), BACKUP_MIGRATE_MENU_PATH, NULL, array(
        'perform backup',
      ));
      $help .= backup_migrate_help_section(t('Advanced Backup Tab'), BACKUP_MIGRATE_MENU_PATH . '/export/advanced', NULL, array(
        'perform backup',
      ));
      $help .= backup_migrate_help_section(t('Restore Tab'), BACKUP_MIGRATE_MENU_PATH . '/restore', NULL, array(
        'restore from backup',
      ));
      $help .= backup_migrate_help_section(t('Destinations'), BACKUP_MIGRATE_MENU_PATH . '/settings/destination', t('Files can be saved to a directory on your web server, downloaded to your desktop or emailed to a specified email account. From the Destinations tab you can create, delete and edit destinations or list the files which have already been backed up to the available destinations.'), array(
        'administer backup and migrate',
      ));
      $help .= backup_migrate_help_section(t('Sources'), BACKUP_MIGRATE_MENU_PATH . '/settings/source', NULL, array(
        'administer backup and migrate',
      ));
      $help .= backup_migrate_help_section(t('Profiles'), BACKUP_MIGRATE_MENU_PATH . '/settings/profile', t('You can create new profiles using the add profiles tab or by checking the "Save these settings" button on the advanced backup page.'), array(
        'administer backup and migrate',
      ));
      $help .= backup_migrate_help_section(t('Scheduling'), BACKUP_MIGRATE_MENU_PATH . '/schedule', t("Each schedule will run a maximum of once per cron run, so they will not run more frequently than your cron is configured to run. If you specify a number of backups to keep for a schedule, old backups will be deleted as new ones created. <strong>If specifiy a number of files to keep other backup files in that schedule's destination will get deleted</strong>."), array(
        'administer backup and migrate',
      ));
      $help .= backup_migrate_help_section(t('Importing Settings'), BACKUP_MIGRATE_MENU_PATH . '/settings/import', NULL, array());
      break;
  }
  return $help;
}