Package com.morpheusdata.core.backup
Interface BackupProviderInterface
- All Superinterfaces:
PluginProvider
- All Known Implementing Classes:
AbstractBackupProvider
,BackupProvider
,MorpheusBackupProvider
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 Summary
Modifier and TypeMethodDescriptionvoid
addScopedProvider
(BackupTypeProvider backupTypeProvider, String provisionTypeCode, String containerTypeCode) Register a scoped provider which associates aBackupTypeProvider
to one or both of aProvisionType
and aContainerType
.void
addScopedProvider
(BackupIntegration backupIntegration) Add a scoped backup provider byBackupIntegration
addToBackupJob
(BackupJob backupJobModel, Map opts) Add a backup to an existing backup job in the external system.cloneBackupJob
(BackupJob sourceBackupJobModel, BackupJob backupJobModel, Map opts) Clone theBackupJob
on the external system.configureBackupJob
(BackupJob backupJobModel, Map config, Map opts) Apply provider specific configurations to aBackupJob
.configureBackupProvider
(BackupProvider backupProviderModel, Map config, Map opts) Apply provider specific configurations to aBackupProvider
.createBackupJob
(BackupJob backupJobModel, Map opts) Create theBackupJob
on the external provider system.deleteBackupJob
(BackupJob backupJobModel, Map opts) Delete the backup job in the external system.deleteBackupProvider
(BackupProvider backupProviderModel, Map opts) Delete the backup provider.executeBackupJob
(BackupJob backupJobModel, Map opts) Execute the backup job on the external system.Get the list of backup job option types for the backup provider.Get the list of backup option types for the backup provider.The backup provider is creatable by the end user.The default job type of the provider.The backup provider allows the end user to download a backup.Sets the enabled state of the provider for consumer use.The backup provider can add a workload backup to an existing job.The backup provider supports backups.The backup provider supports cloning a job from an existing job.The backup provider supports copying the backup to a separate datastore (export).The backup provider supports creating new jobs.The backup provider supports running multiple workload backups within an encapsulating job.The backup provider supports backups outside an encapsulating job.The backup provider supports replication.The backup provider supports replication groups.The backup provider supports multiple repositories for storage of backup assets.The backup provider supports retention counts for maintaining the desired number of backups.The backup provider supports scheduled backups.The backup provider supports backup servers.The backup provider supports backup sites.The backup provider supports streaming directly to the datastore.getIcon()
Returns the integration logo for display when a user needs to view or add this integrationGet the list of replication group option types for the backup provider.Get the list of option types for the backup provider.Get the list of replication group option types for the backup provider.Get the list of replication option types for the backup provider.The backup provider supports restoring to an existing workload.The backup provider supports restoring to a new workload.Get a list of all registered scoped providersdefault String
Deprecated, for removal: This API element is subject to removal in a future version.The backup provider has the ability to cancel an in-progress backup.The backup provider supports multiple storage providers.initializeBackupProvider
(BackupProvider backupProviderModel, Map opts) Execute operations upon initialization of a new backup provider.refresh
(BackupProvider backupProvider) The main refresh method called periodically by Morpheus to sync any necessary objects from the integration.updateBackupProvider
(BackupProvider backupProviderModel, Map opts) Update the backup providervalidateBackupJob
(BackupJob backupJobModel, Map config, Map opts) Validate the configuration of theBackupJob
.validateBackupProvider
(BackupProvider backupProviderModel, Map opts) Validate the configuration of theBackupProvider
.Methods inherited from interface com.morpheusdata.core.providers.PluginProvider
getCode, getMorpheus, getName, getPlugin, isPlugin
-
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, 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
Add a scoped backup provider byBackupIntegration
- Parameters:
backupIntegration
- the scoped provider to add
-
addScopedProvider
void addScopedProvider(BackupTypeProvider backupTypeProvider, String provisionTypeCode, String containerTypeCode) Register a scoped provider which associates aBackupTypeProvider
to one or both of aProvisionType
and aContainerType
.- Parameters:
backupTypeProvider
- the current backup type provider instanceprovisionTypeCode
- the provision type code unique to the specific types of workloads this is scoped tocontainerTypeCode
- 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
Apply provider specific configurations to aBackupProvider
. The standard configurations are handled by the core system.- Parameters:
backupProviderModel
- backup provider to configureconfig
- 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
Validate the configuration of theBackupProvider
. 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 validateopts
- 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
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 initializingopts
- additional options- Returns:
- a
ServiceResponse
object. A ServiceResponse with a false success will indicate a failed initialization and will halt the process.
-
updateBackupProvider
Update the backup provider- Parameters:
backupProviderModel
- the backup provideropts
- additional options- Returns:
- a
ServiceResponse
object. A ServiceResponse with a false success will indicate a failed update and will halt the process.
-
deleteBackupProvider
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 removedopts
- additional options- Returns:
- a
ServiceResponse
object. A ServiceResponse with a false success will indicate a failed delete and will halt the process.
-
refresh
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 thatSyncTask
is used.When an unsuccessful services response is returned an alarm will be created with the value of either the
ServiceResponse.error()
orServiceResponse.getMsg()
value. When a successful response is returned any alarms on the provider will be cleared.- Parameters:
backupProvider
- the current instance of the backupProvider being refreshed- Returns:
- the success state of the refresh
-
configureBackupJob
Apply provider specific configurations to aBackupJob
. The standard configurations are handled by the core system.- Parameters:
backupJobModel
- the backup job to apply the configuration changes toconfig
- 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
Validate the configuration of theBackupJob
. 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 validateconfig
- 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 oferrors['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
Create theBackupJob
on the external provider system.- Parameters:
backupJobModel
- the fully configured and validated backup jobopts
- 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
Clone theBackupJob
on the external system.- Parameters:
sourceBackupJobModel
- the source backup job for cloningbackupJobModel
- 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
Add a backup to an existing backup job in the external system.- Parameters:
backupJobModel
- the backup job receiving the additional backupopts
- 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
Delete the backup job in the external system.- Parameters:
backupJobModel
- the backup job to be removedopts
- 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
Execute the backup job on the external system.- Parameters:
backupJobModel
- the backup job to be executedopts
- 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.
-