public Future<String> spawnBackup(String backupAgentName,String storageAgentName,boolean isOnline) throws BackupException, UnsupportedCapabilityException {
  if (logger.isDebugEnabled()) {
    logger.debug("Processing backup request: backup=" + backupAgentName + " storage="+ storageAgentName);
  }
  assertEnabled();
  backupAgentName=resolveBackupAgentName(backupAgentName);
  BackupAgent backupAgent=findBackupAgent(backupAgentName);
  StorageAgent storageAgent=findStorageAgent(storageAgentName);
  if (isOnline) {
    BackupCapabilities caps=backupAgent.capabilities();
    if (!caps.isHotBackupEnabled()) {
      throw new UnsupportedCapabilityException("Online backup not supported for agent type " + backupAgentName);
    }
  }
  BackupTask callable=new BackupTask(eventDispatcher,backupAgentName,backupAgent,storageAgent);
  Future<String> task=taskService.submit(callable);
  return task;
}

public Future < String > spawnBackup ( String backupAgentName , String storageAgentName , boolean isOnline ) throws BackupException , UnsupportedCapabilityException { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Processing backup request: backup=" + backupAgentName + " storage=" + storageAgentName ) ; } assertEnabled ( ) ; backupAgentName = resolveBackupAgentName ( backupAgentName ) ; BackupAgent backupAgent = findBackupAgent ( backupAgentName ) ; StorageAgent storageAgent = findStorageAgent ( storageAgentName ) ; if ( isOnline ) { BackupCapabilities caps = backupAgent . capabilities ( ) ; if ( ! caps . isHotBackupEnabled ( ) ) { throw new UnsupportedCapabilityException ( "Online backup not supported for agent type " + backupAgentName ) ; } } BackupTask callable = new BackupTask ( eventDispatcher , backupAgentName , backupAgent , storageAgent ) ; Future < String > task = taskService . submit ( callable ) ; return task ; }
run backup and store output .
