Interface MorpheusSynchronousBackupService

All Superinterfaces:
MorpheusSynchronousDataService<Backup,BackupIdentityProjection>, MorpheusSynchronousIdentityService<BackupIdentityProjection>

  • Method Details

    • getType

      Returns the MorpheusBackupTypeContext used for performing updates/queries on BackupType related assets within Morpheus.
      Returns:
      An instance of the BackupTypeContext to be used for calls by various backup providers
    • getBackupJob

      Returns the BackupJobContext used for performing updates or queries on BackupJob related assets within Morpheus. Typically this would be called by a BackupProvider
      Returns:
      An instance of the Backup Job Context to be used for calls by various backup providers
    • getBackupResult

      Returns the BackupResultContext used for performing updates or queries on BackupResult related assets within Morpheus. Typically this would be called by a BackupProvider.
      Returns:
      An instance of the Backup Result Context to be used for calls by various backup providers
    • getBackupRestore

      Returns the BackupRestoreContext used for performing updates or queries on BackupRestore related assets within Morpheus. Typically this would be called by a BackupProvider.
      Returns:
      An instance of the Backup Restore Context to be used for calls by various backup providers
    • getReplication

      Returns the MorpheusReplicationContext used for performing updates/queries on Replication related assets within Morpheus.
      Returns:
      An instance of the MorpheusReplicationContext to be used for calls by various backup providers
    • getBackupStorageBucket

      StorageBucket getBackupStorageBucket(AccountIdentity accountIdentity, Long backupId)
      Returns the StorageBucket associated with a Backup object. If the backup does not have an associated storage bucket, the default backup storage bucket will be returned.
      Parameters:
      accountIdentity - the AccountIdentity object to use for the storage bucket lookup
      backupId - the ID of the Backup object to use for the storage bucket lookup
      Returns:
      the Single Observable containing the StorageBucket object for subscription
    • getBackupStorageBucket

      StorageBucket getBackupStorageBucket(AccountIdentity accountIdentity, Long backupId, Long storageProviderId)
      Returns the StorageBucket associated with a Backup object. If the backup does not have an associated storage bucket, the default backup storage bucket will be returned.
      Parameters:
      accountIdentity - the AccountIdentity object to use for the storage bucket lookup
      backupId - the ID of the Backup object to use for the storage bucket lookup
      storageProviderId - the ID of the StorageProvider object to use for the storage bucket lookup
      Returns:
      the Single Observable containing the StorageBucket object for subscription
    • getBackupStorageProvider

      com.bertramlabs.plugins.karman.StorageProvider getBackupStorageProvider()
      Returns the StorageProvider for the default backup storage bucket.
      Returns:
      the Single Observable containing the StorageProvider object for subscription
    • getBackupStorageProvider

      com.bertramlabs.plugins.karman.StorageProvider getBackupStorageProvider(Long storageBucketId)
      Returns the StorageProvider for a specific storage bucket.
      Parameters:
      storageBucketId - the ID of the StorageBucket object to use for the storage provider lookup
      Returns:
      the Single Observable containing the StorageProvider object for subscription
    • getBackupStorageProvider

      com.bertramlabs.plugins.karman.StorageProvider getBackupStorageProvider(Long storageBucketId, String basePath)
      Returns the StorageProvider for a specific storage bucket and base path.
      Parameters:
      storageBucketId - the ID of the StorageBucket object to use for the storage provider lookup
      basePath - the base path to use for the storage provider
      Returns:
      the Single Observable containing the StorageProvider object for subscription
    • getBackupWorkingPath

      String getBackupWorkingPath(Long backupId, Long backupResultId)
      Returns the working path for a backup result. This is typically used to store temporary files or directories for the backup process.
      Parameters:
      backupId - the id of the Backup object
      backupResultId - the id of the BackupResult object
      Returns:
      the working path for the backup result
    • saveBackupResults

      ServiceResponse saveBackupResults(AccountIdentity account, String workingPath, Long backupId)
      Compresses the backup working directory into a zip archive and saves it to the configured backup storage provider. This is typically called at the end of BackupExecutionProvider.extractBackup(com.morpheusdata.model.BackupResult, java.util.Map) after the backup data has been written to the working path. The result contains metadata needed to update the BackupResult (bucket, directory, archive name, and archive size).
      Parameters:
      account - the AccountIdentity that owns the backup
      workingPath - the local directory path containing the backup data to compress and upload
      backupId - the id of the Backup object
      Returns:
      a ServiceResponse with result metadata: providerType, basePath, targetBucket, targetDirectory, targetArchive, archiveSize
    • transferBackupToVirtualImage

      ServiceResponse<VirtualImage> transferBackupToVirtualImage(AccountIdentity account, BackupResult backupResult, Map opts, VirtualImage sourceImage)
      Transfers a backup archive from backup storage into a new VirtualImage, enabling restore-to-new-instance workflows. Files are streamed from the backup storage provider into the default virtual image storage location. The sourceImage parameter is optional and, when provided, is used to inherit cloudInit, installAgent, and SSH credential settings onto the new image.
      Parameters:
      account - the AccountIdentity that owns the backup
      backupResult - the BackupResult whose archive should be transferred
      opts - a map of options: imageType (e.g. 'vmdk'), zoneTypeCode, osType, name
      sourceImage - optional source VirtualImage to inherit settings from; may be null
      Returns:
      a ServiceResponse whose data is the newly created VirtualImage