Interface BackupProviderInterface

All Superinterfaces:
PluginProvider
All Known Implementing Classes:
AbstractBackupProvider, BackupProvider, MorpheusBackupProvider

public interface BackupProviderInterface extends PluginProvider
This is the main entrypoint for registering a backup provider. Morpheus models backup integrations as a tree. A BackupProvider can have many backup types and therefore needs backup type providers scoped to specific types. Typically, it is best to extend the AbstractBackupProvider rather than directly implementing some of these methods.
Since:
0.12.2
See Also:
  • Method Details

    • getIcon

      Icon getIcon()
      Returns the integration logo for display when a user needs to view or add this integration
      Returns:
      Icon representation of assets stored in the src/assets of the project.
    • getViewSet

      @Deprecated(since="0.14.0", forRemoval=true) default String getViewSet()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns a viewset for reference custom inputs when setting up a backup provider during add instance. This is the old way and is no longer being used.
    • getEnabled

      Boolean getEnabled()
      Sets the enabled state of the provider for consumer use. NOTE: This may go away as it should be implied by the installation state of the plugin
    • getCreatable

      Boolean getCreatable()
      The backup provider is creatable by the end user. This could be false for providers that may be forced by specific CloudProvider plugins, for example.
    • getDownloadEnabled

      Boolean getDownloadEnabled()
      The backup provider allows the end user to download a backup. Some backup providers can allow the user to download the backup archive file.
    • getHasAddToJob

      Boolean getHasAddToJob()
      The backup provider can add a workload backup to an existing job.
    • getHasBackups

      Boolean getHasBackups()
      The backup provider supports backups. For example, a backup provider may be intended for disaster recovery failover only and may not directly support backups.
    • hasCancelBackup

      Boolean hasCancelBackup()
      The backup provider has the ability to cancel an in-progress backup.
    • getHasCloneJob

      Boolean getHasCloneJob()
      The backup provider supports cloning a job from an existing job.
    • getHasCopyToStore

      Boolean getHasCopyToStore()
      The backup provider supports copying the backup to a separate datastore (export).
    • getHasCreateJob

      Boolean getHasCreateJob()
      The backup provider supports creating new jobs.
    • getHasJobs

      Boolean getHasJobs()
      The backup provider supports running multiple workload backups within an encapsulating job.
    • getDefaultJobType

      String getDefaultJobType()
      The default job type of the provider. The basic options are: new, clone, addTo, none
    • getHasOptionalJob

      Boolean getHasOptionalJob()
      The backup provider supports backups outside an encapsulating job.
    • getHasReplication

      Boolean getHasReplication()
      The backup provider supports replication.
    • getHasReplicationGroups

      Boolean getHasReplicationGroups()
      The backup provider supports replication groups.
    • getHasRepositories

      Boolean getHasRepositories()
      The backup provider supports multiple repositories for storage of backup assets. This is used for the display and selection of repositories during backup configuration steps.
    • getHasRetentionCount

      Boolean getHasRetentionCount()
      The backup provider supports retention counts for maintaining the desired number of backups.
    • getHasSchedule

      Boolean getHasSchedule()
      The backup provider supports scheduled backups. This is primarily used for display of hte schedules and providing options during the backup configuration steps.
    • getHasServers

      Boolean getHasServers()
      The backup provider supports backup servers.
    • getHasSites

      Boolean getHasSites()
      The backup provider supports backup sites.
    • hasStorageProvider

      Boolean hasStorageProvider()
      The backup provider supports multiple storage providers.
    • getHasStreamToStore

      Boolean getHasStreamToStore()
      The backup provider supports streaming directly to the datastore.
    • getRestoreExistingEnabled

      Boolean getRestoreExistingEnabled()
      The backup provider supports restoring to an existing workload.
    • getRestoreNewEnabled

      Boolean getRestoreNewEnabled()
      The backup provider supports restoring to a new workload.
    • getOptionTypes

      Collection<OptionType> getOptionTypes()
      Get the list of option types for the backup provider. The option types are used for creating and updating an instance of the backup provider.
    • getReplicationGroupOptionTypes

      Collection<OptionType> getReplicationGroupOptionTypes()
      Get the list of replication group option types for the backup provider. The option types are used for creating and updating replication groups.
    • getReplicationOptionTypes

      Collection<OptionType> getReplicationOptionTypes()
      Get the list of replication option types for the backup provider. The option types are used for creating and updating replications.
    • getBackupJobOptionTypes

      Collection<OptionType> getBackupJobOptionTypes()
      Get the list of backup job option types for the backup provider. The option types are used for creating and updating backup jobs.
    • getBackupOptionTypes

      Collection<OptionType> getBackupOptionTypes()
      Get the list of backup option types for the backup provider. The option types are used for creating and updating backups.
    • getInstanceReplicationGroupOptionTypes

      Collection<OptionType> getInstanceReplicationGroupOptionTypes()
      Get the list of replication group option types for the backup provider. The option types are used for creating replications on an instance during provisioning.
    • addScopedProvider

      void addScopedProvider(BackupIntegration backupIntegration)
      Add a scoped backup provider by BackupIntegration
      Parameters:
      backupIntegration - the scoped provider to add
    • addScopedProvider

      void addScopedProvider(BackupTypeProvider backupTypeProvider, String provisionTypeCode, String containerTypeCode)
      Register a scoped provider which associates a BackupTypeProvider to one or both of a ProvisionType and a ContainerType.
      Parameters:
      backupTypeProvider - the current backup type provider instance
      provisionTypeCode - the provision type code unique to the specific types of workloads this is scoped to
      containerTypeCode - optional workload type code in the event the backup type is very specific to a workload type.
    • getScopedProviders

      Collection<BackupIntegration> getScopedProviders()
      Get a list of all registered scoped providers
      Returns:
      list of scoped providers
    • configureBackupProvider

      ServiceResponse configureBackupProvider(BackupProvider backupProviderModel, Map config, Map opts)
      Apply provider specific configurations to a BackupProvider. The standard configurations are handled by the core system.
      Parameters:
      backupProviderModel - backup provider to configure
      config - the configuration supplied by external inputs.
      opts - optional parameters used for configuration.
      Returns:
      a ServiceResponse object. A ServiceResponse with a false success will indicate a failed configuration and will halt the backup creation process.
    • validateBackupProvider

      ServiceResponse validateBackupProvider(BackupProvider backupProviderModel, Map opts)
      Validate the configuration of the BackupProvider. Morpheus will validate the backup based on the supplied option type configurations such as required fields. Use this to either override the validation results supplied by the default validation or to create additional validations beyond the capabilities of option type validation.
      Parameters:
      backupProviderModel - backup provider to validate
      opts - additional options
      Returns:
      a ServiceResponse object. A ServiceResponse with a false success will indicate a failed validation and will halt the backup provider creation process.
    • initializeBackupProvider

      ServiceResponse initializeBackupProvider(BackupProvider backupProviderModel, Map opts)
      Execute operations upon initialization of a new backup provider. This method is executed after a successful save and is used to setup any additional require resources and execute the first full integration sync.
      Parameters:
      backupProviderModel - backup provider initializing
      opts - additional options
      Returns:
      a ServiceResponse object. A ServiceResponse with a false success will indicate a failed initialization and will halt the process.
    • updateBackupProvider

      ServiceResponse updateBackupProvider(BackupProvider backupProviderModel, Map opts)
      Update the backup provider
      Parameters:
      backupProviderModel - the backup provider
      opts - additional options
      Returns:
      a ServiceResponse object. A ServiceResponse with a false success will indicate a failed update and will halt the process.
    • deleteBackupProvider

      ServiceResponse deleteBackupProvider(BackupProvider backupProviderModel, Map opts)
      Delete the backup provider. Typically used to clean up any provider specific data that will not be cleaned up by the default remove in the core system.
      Parameters:
      backupProviderModel - the backup provider being removed
      opts - additional options
      Returns:
      a ServiceResponse object. A ServiceResponse with a false success will indicate a failed delete and will halt the process.
    • refresh

      ServiceResponse refresh(BackupProvider backupProvider)
      The main refresh method called periodically by Morpheus to sync any necessary objects from the integration. This can call sub services for better organization. It is recommended that SyncTask is used.
      Parameters:
      backupProvider - the current instance of the backupProvider being refreshed
      Returns:
      the success state of the refresh
    • configureBackupJob

      ServiceResponse configureBackupJob(BackupJob backupJobModel, Map config, Map opts)
      Apply provider specific configurations to a BackupJob. The standard configurations are handled by the core system.
      Parameters:
      backupJobModel - the backup job to apply the configuration changes to
      config - the configuration supplied by external inputs.
      opts - optional parameters used for configuration.
      Returns:
      a ServiceResponse object. A ServiceResponse with a false success will indicate a failed configuration and will halt the backup creation process.
    • validateBackupJob

      ServiceResponse validateBackupJob(BackupJob backupJobModel, Map config, Map opts)
      Validate the configuration of the BackupJob. Morpheus will validate the backup based on the supplied option type configurations such as required fields. Use this to either override the validation results supplied by the default validation or to create additional validations beyond the capabilities of option type validation.
      Parameters:
      backupJobModel - the backup job to validate
      config - the original configuration supplied by external inputs.
      opts - optional parameters used for
      Returns:
      a ServiceResponse object. The errors field of the ServiceResponse is used to send validation results back to the interface in the format of errors['fieldName'] = 'validation message' . The msg property can be used to send generic validation text that is not related to a specific field on the model. A ServiceResponse with any items in the errors list or a success value of 'false' will halt the backup job creation process.
    • createBackupJob

      ServiceResponse createBackupJob(BackupJob backupJobModel, Map opts)
      Create the BackupJob on the external provider system.
      Parameters:
      backupJobModel - the fully configured and validated backup job
      opts - additional options used during backup job creation
      Returns:
      a ServiceResponse object. A ServiceResponse with a success value of 'false' will indicate the creation on the external system failed and will halt any further processing in Morpheus.
    • cloneBackupJob

      ServiceResponse cloneBackupJob(BackupJob sourceBackupJobModel, BackupJob backupJobModel, Map opts)
      Clone the BackupJob on the external system.
      Parameters:
      sourceBackupJobModel - the source backup job for cloning
      backupJobModel - the backup job that will be associated to the cloned backup job. The externalId of the backup job should be set with the ID of the cloned job result.
      opts - additional options used during backup job clone
      Returns:
      a ServiceResponse object. A ServiceResponse with a success value of 'false' will indicate the clone on the external system failed and will halt any further processing in Morpheus.
    • addToBackupJob

      ServiceResponse addToBackupJob(BackupJob backupJobModel, Map opts)
      Add a backup to an existing backup job in the external system.
      Parameters:
      backupJobModel - the backup job receiving the additional backup
      opts - additional options
      Returns:
      a ServiceResponse object. A ServiceResponse with a success value of 'false' will indicate the operation on the external system failed and will halt any further processing in Morpheus.
    • deleteBackupJob

      ServiceResponse deleteBackupJob(BackupJob backupJobModel, Map opts)
      Delete the backup job in the external system.
      Parameters:
      backupJobModel - the backup job to be removed
      opts - additional options
      Returns:
      a ServiceResponse object. A ServiceResponse with a success value of 'false' will indicate the operation on the external system failed and will halt any further processing in Morpheus.
    • executeBackupJob

      ServiceResponse executeBackupJob(BackupJob backupJobModel, Map opts)
      Execute the backup job on the external system.
      Parameters:
      backupJobModel - the backup job to be executed
      opts - additional options
      Returns:
      a ServiceResponse object. A ServiceResponse with a success value of 'false' will indicate the operation on the external system failed and will halt any further processing in Morpheus.