You are here

function backup_migrate_schedule in Backup and Migrate 5

Same name and namespace in other branches
  1. 6 backup_migrate.module \backup_migrate_schedule()

The schedule form.

1 string reference to 'backup_migrate_schedule'
backup_migrate_menu in ./backup_migrate.module
Implementation of hook_menu().

File

./backup_migrate.module, line 206
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_schedule() {
  $form = array();
  $form['backup_migrate_schedule_backup_period'] = array(
    "#type" => "textfield",
    "#title" => t("Backup every"),
    "#field_suffix" => t("Hour(s)"),
    "#description" => t("Use 0 for no scheduled backup. Cron must be configured to run for backups to work."),
    "#default_value" => variable_get("backup_migrate_schedule_backup_period", 0),
  );
  $form['backup_migrate_schedule_backup_keep'] = array(
    "#type" => "textfield",
    "#title" => t("Number of Backup files to keep"),
    "#description" => t("The number of backup files to keep before deleting old ones. Use 0 to never delete backups"),
    "#default_value" => variable_get("backup_migrate_schedule_backup_keep", 0),
  );
  if (!_backup_migrate_check_destination_dir('scheduled')) {
    $form['backup_migrate_schedule_backup_period']['#disabled'] = TRUE;
    $form['backup_migrate_schedule_backup_keep']['#disabled'] = TRUE;
  }
  return system_settings_form($form);
}