You are here

function nodesquirrel_get_destination in Backup and Migrate 6.3

Same name and namespace in other branches
  1. 6.2 includes/destinations.nodesquirrel.inc \nodesquirrel_get_destination()
  2. 7.2 includes/destinations.nodesquirrel.inc \nodesquirrel_get_destination()

Get the NS destination for the given key.

1 call to nodesquirrel_get_destination()
nodesquirrel_check_secret_key in includes/destinations.nodesquirrel.inc
Check that a nodesquirel key is valid.

File

includes/destinations.nodesquirrel.inc, line 27
Functions to handle the NodeSquirrel backup destination.

Code

function nodesquirrel_get_destination($secret_key) {
  if ($secret_key) {
    backup_migrate_include('destinations');
    $destination = backup_migrate_create_destination('nodesquirrel', array(
      'destination_id' => 'nodesquirrel',
    ));
    $destination->settings['secret_key'] = $secret_key;
    return $destination;
  }
  return NULL;
}