Package com.morpheusdata.core.backup
Class AbstractBackupProvider
java.lang.Object
com.morpheusdata.core.backup.BackupProvider
com.morpheusdata.core.backup.AbstractBackupProvider
- All Implemented Interfaces:
BackupProviderInterface
,PluginProvider
- Direct Known Subclasses:
MorpheusBackupProvider
Provides a standard set of methods for a
BackupProvider
. A backup provider is the primary connection to the
external provider services. The backup provider supplies providers for provision types and/or container types via
the BackupTypeProviders
implemented within the provider.- Since:
- 0.13.4
-
Field Summary
Fields inherited from class com.morpheusdata.core.backup.BackupProvider
scopedProviders
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addScopedProvider
(BackupTypeProvider backupTypeProvider, String provisionTypeCode, String containerTypeCode) Add a scoped backup provider.void
addScopedProvider
(BackupIntegration backupIntegration) Add a scoped backup provider.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.executeBackupJob
(BackupJob backupJobModel, Map opts) Execute the backup job on the external system.abstract BackupJobProvider
Get theBackupJobProvider
responsible for all backup job operations in this backup provider TheDefaultBackupJobProvider
can be used if the provider would like morpheus to handle all job operations.Get the list ofBackupTypeProviders
associated with this backup providerThe 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.Returns the Morpheus Context for interacting with data stored in the Main Morpheus ApplicationReturns the instance of the Plugin class that this provider is loaded fromThe backup provider supports restoring to an existing workload.The backup provider supports restoring to a new workload.Get the list ofBackupIntegrations
associated with this backup providerThe 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.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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.morpheusdata.core.backup.BackupProviderInterface
deleteBackupProvider, getBackupJobOptionTypes, getBackupOptionTypes, getIcon, getInstanceReplicationGroupOptionTypes, getOptionTypes, getReplicationGroupOptionTypes, getReplicationOptionTypes, getViewSet, refresh
Methods inherited from interface com.morpheusdata.core.providers.PluginProvider
getCode, getName, isPlugin
-
Constructor Details
-
AbstractBackupProvider
-
-
Method Details
-
getMorpheus
Description copied from interface:PluginProvider
Returns the Morpheus Context for interacting with data stored in the Main Morpheus Application- Returns:
- an implementation of the MorpheusContext for running Future based rxJava queries
-
getPlugin
Description copied from interface:PluginProvider
Returns the instance of the Plugin class that this provider is loaded from- Returns:
- Plugin class contains references to other providers
-
getEnabled
Description copied from interface:BackupProviderInterface
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
Description copied from interface:BackupProviderInterface
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
Description copied from interface:BackupProviderInterface
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
Description copied from interface:BackupProviderInterface
The backup provider can add a workload backup to an existing job. -
getHasBackups
Description copied from interface:BackupProviderInterface
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
Description copied from interface:BackupProviderInterface
The backup provider has the ability to cancel an in-progress backup. -
getHasCloneJob
Description copied from interface:BackupProviderInterface
The backup provider supports cloning a job from an existing job. -
getHasCopyToStore
Description copied from interface:BackupProviderInterface
The backup provider supports copying the backup to a separate datastore (export). -
getHasCreateJob
Description copied from interface:BackupProviderInterface
The backup provider supports creating new jobs. -
getHasJobs
Description copied from interface:BackupProviderInterface
The backup provider supports running multiple workload backups within an encapsulating job. -
getDefaultJobType
Description copied from interface:BackupProviderInterface
The default job type of the provider. The basic options are: new, clone, addTo, none -
getHasOptionalJob
Description copied from interface:BackupProviderInterface
The backup provider supports backups outside an encapsulating job. -
getHasReplication
Description copied from interface:BackupProviderInterface
The backup provider supports replication. -
getHasReplicationGroups
Description copied from interface:BackupProviderInterface
The backup provider supports replication groups. -
getHasRepositories
Description copied from interface:BackupProviderInterface
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
Description copied from interface:BackupProviderInterface
The backup provider supports retention counts for maintaining the desired number of backups. -
getHasSchedule
Description copied from interface:BackupProviderInterface
The backup provider supports scheduled backups. This is primarily used for display of hte schedules and providing options during the backup configuration steps. -
getHasServers
Description copied from interface:BackupProviderInterface
The backup provider supports backup servers. -
getHasSites
Description copied from interface:BackupProviderInterface
The backup provider supports backup sites. -
hasStorageProvider
Description copied from interface:BackupProviderInterface
The backup provider supports multiple storage providers. -
getHasStreamToStore
Description copied from interface:BackupProviderInterface
The backup provider supports streaming directly to the datastore. -
getRestoreExistingEnabled
Description copied from interface:BackupProviderInterface
The backup provider supports restoring to an existing workload. -
getRestoreNewEnabled
Description copied from interface:BackupProviderInterface
The backup provider supports restoring to a new workload. -
addScopedProvider
Add a scoped backup provider. ABackupIntegration
links the provider to the provision or container type. Morpheus will use this associated to determine * the available providers when executing an operation in the backup services.- Parameters:
backupIntegration
- a backup integration referencing the provider type and the provision and/or container types
-
addScopedProvider
public void addScopedProvider(BackupTypeProvider backupTypeProvider, String provisionTypeCode, String containerTypeCode) Add a scoped backup provider. Registers aBackupTypeProvider
and the associated provision and/or container types with morpheus. Morpheus will use this associated to determine the available providers when executing an operation in the backup services.- Parameters:
backupTypeProvider
- the backup type provider to registerprovisionTypeCode
- the provision type code to be associated with the backup type providercontainerTypeCode
- the container type code to be associated with the backup the provider
-
getScopedProviders
Get the list ofBackupIntegrations
associated with this backup provider- Returns:
- a list of
BackupIntegrations
-
getBackupProviders
Get the list ofBackupTypeProviders
associated with this backup provider- Returns:
- a list of
BackupTypeProviders
-
configureBackupProvider
public ServiceResponse configureBackupProvider(BackupProvider backupProviderModel, Map config, Map opts) Description copied from interface:BackupProviderInterface
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
Description copied from interface:BackupProviderInterface
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
Description copied from interface:BackupProviderInterface
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
Description copied from interface:BackupProviderInterface
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.
-
getBackupJobProvider
Get theBackupJobProvider
responsible for all backup job operations in this backup provider TheDefaultBackupJobProvider
can be used if the provider would like morpheus to handle all job operations.- Returns:
- the
BackupJobProvider
for this backup provider
-
configureBackupJob
Description copied from interface:BackupProviderInterface
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
Description copied from interface:BackupProviderInterface
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
Description copied from interface:BackupProviderInterface
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
public ServiceResponse cloneBackupJob(BackupJob sourceBackupJobModel, BackupJob backupJobModel, Map opts) Description copied from interface:BackupProviderInterface
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
Description copied from interface:BackupProviderInterface
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
Description copied from interface:BackupProviderInterface
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
Description copied from interface:BackupProviderInterface
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.
-