function backup_migrate_backup_migrate_destinations

cis7 destinations.inc backup_migrate_backup_migrate_destinations()
cle7 destinations.inc backup_migrate_backup_migrate_destinations()
elmsmedia7 destinations.inc backup_migrate_backup_migrate_destinations()
icor7 destinations.inc backup_migrate_backup_migrate_destinations()
meedjum_blog7 destinations.inc backup_migrate_backup_migrate_destinations()
mooc7 destinations.inc backup_migrate_backup_migrate_destinations()

Implementation of hook_backup_migrate_destinations().

Get the built in backup destinations and those in the db.

File

sites/all/modules/ulmus/backup_migrate/includes/destinations.inc, line 116
All of the destination handling code needed for Backup and Migrate.

Code

function backup_migrate_backup_migrate_destinations() {
  $out = array();

  // Add the default, out of the box destinations for new users.
  if (variable_get('backup_migrate_allow_backup_to_file', TRUE)) {
    if (variable_get('file_private_path', FALSE)) {
      $out['manual'] = backup_migrate_create_destination('file_manual', array('destination_id' => 'manual'));
      $out['scheduled'] = backup_migrate_create_destination('file_scheduled', array('destination_id' => 'scheduled'));
    }
    else {
      _backup_migrate_message('You must specify a private file system path in the !settings to backup to the server.', array('!settings' => l(t('file system settings'), 'admin/config/media/file-system')), 'warning');
    }
  }
  // Add the browser destination for downloading to the desktop.
  if (variable_get('backup_migrate_allow_backup_to_download', TRUE)) {
    $out['download'] = backup_migrate_create_destination('browser_download');
  }
  $out['upload'] = backup_migrate_create_destination('browser_upload');

  if ($secret_key = variable_get('nodesquirrel_secret_key', '')) {
    $out['nodesquirrel'] = backup_migrate_create_destination('nodesquirrel', array('destination_id' => 'nodesquirrel'));
    $out['nodesquirrel']->settings['secret_key'] = $secret_key;
  }

  // Expose the configured databases as sources.
  backup_migrate_include('filters');
  $out += backup_migrate_filters_invoke_all('destinations');
  /*
  global $db_url;
  $urls = is_array($db_url) ? $db_url : array('default' => $db_url);
  foreach ((array)$urls as $key => $url) {
    // Only mysql is currently supported. If more DBMs's are implemented, theis will need to be abstacted.
    if (strpos($url, 'mysql') === 0) {
      if ($destination = backup_migrate_create_destination('mysql', array('url' => $url))) {
        // Treat the default database differently because it is probably the only one available.
        if ($key == 'default') {
          $destination->set_id('db');
          $destination->set_name(t('Default Database'));
          // Dissalow backing up to the default database because that's confusing and potentially dangerous.
          unset($destination->supported_ops['scheduled backup']);
          unset($destination->supported_ops['manual backup']);
        }
        else {
          $destination->set_id('db:'. $key);
          $destination->set_name($key .": ". $destination->get_display_location());
        }
        $out[$destination->get_id()] = $destination;
      }
    }
  }
*/
  return $out;
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.