Skip to main content

Class CreateBackupRequest

java.lang.Object
com.gpudb.protocol.CreateBackupRequest
All Implemented Interfaces:
org.apache.avro.generic.GenericContainer, org.apache.avro.generic.IndexedRecord

public class CreateBackupRequest extends Object implements org.apache.avro.generic.IndexedRecord
A set of parameters for GPUdb.createBackup.

Creates a database backup, containing a snapshot of existing objects, at the remote file store accessible via the data sink specified by datasinkName.

  • Constructor Details

  • Method Details

    • getClassSchema

      public static org.apache.avro.Schema getClassSchema()
      This method supports the Avro framework and is not intended to be called directly by the user.
      Returns:
      The schema for the class.
    • getBackupName

      public String getBackupName()
      Name for this backup. If the backup already exists, only an incremental or differential backup can be made, unless RECREATE is set to TRUE.
      Returns:
      The current value of backupName.
    • setBackupName

      public CreateBackupRequest setBackupName(String backupName)
      Name for this backup. If the backup already exists, only an incremental or differential backup can be made, unless RECREATE is set to TRUE.
      Parameters:
      backupName - The new value for backupName.
      Returns:
      this to mimic the builder pattern.
    • getBackupType

      public String getBackupType()
      Type of snapshot to create. Supported values:
      • DIFFERENTIAL: Snapshot of changes in the database objects and data since the last full snapshot.
      • FULL: Snapshot of the given database objects and data.
      • INCREMENTAL: Snapshot of changes in the database objects and data since the last snapshot of any kind.
      Returns:
      The current value of backupType.
    • setBackupType

      public CreateBackupRequest setBackupType(String backupType)
      Type of snapshot to create. Supported values:
      • DIFFERENTIAL: Snapshot of changes in the database objects and data since the last full snapshot.
      • FULL: Snapshot of the given database objects and data.
      • INCREMENTAL: Snapshot of changes in the database objects and data since the last snapshot of any kind.
      Parameters:
      backupType - The new value for backupType.
      Returns:
      this to mimic the builder pattern.
    • getBackupObjectsMap

      public Map<String,String> getBackupObjectsMap()
      Map of objects to be captured in the backup; must be specified when creating a full snapshot and left unspecified when creating an incremental or differential snapshot.The default value is an empty Map.
      Returns:
      The current value of backupObjectsMap.
    • setBackupObjectsMap

      public CreateBackupRequest setBackupObjectsMap(Map<String,String> backupObjectsMap)
      Map of objects to be captured in the backup; must be specified when creating a full snapshot and left unspecified when creating an incremental or differential snapshot.The default value is an empty Map.
      Parameters:
      backupObjectsMap - The new value for backupObjectsMap.
      Returns:
      this to mimic the builder pattern.
    • getDatasinkName

      public String getDatasinkName()
      Data sink through which the backup will be stored.
      Returns:
      The current value of datasinkName.
    • setDatasinkName

      public CreateBackupRequest setDatasinkName(String datasinkName)
      Data sink through which the backup will be stored.
      Parameters:
      datasinkName - The new value for datasinkName.
      Returns:
      this to mimic the builder pattern.
    • getOptions

      public Map<String,String> getOptions()
      Optional parameters.
      • BLOCK_TABLE_MUTATIONS: Whether or not to block all mutations on target tables while they are being backed up. Supported values:
        • TRUE: Block all mutations on target tables while they are being backed up.
        • FALSE: Only block mutations on a target table at the point a disk eviction is necessary.
        The default value is FALSE.
      • CHECKSUM: Whether or not to calculate checksums for backup files. Supported values:The default value is FALSE.
      • COMMENT: Comments to store with this backup.
      • DDL_ONLY: Whether or not, for tables, to only backup DDL and not table data. Supported values:
        • TRUE: For tables, only back up DDL, not data.
        • FALSE: For tables, back up DDL and data.
        The default value is FALSE.
      • DELETE_INTERMEDIATE_BACKUPS: Whether or not to delete any intermediate snapshots when the backupType is set to DIFFERENTIAL. Supported values:The default value is FALSE.
      • DRY_RUN: Whether or not to perform a dry run of a backup operation. Supported values:The default value is FALSE.
      • MAX_INCREMENTAL_BACKUPS_TO_KEEP: Maximum number of incremental snapshots to keep. The default value is ‘-1’.
      • RECREATE: Whether or not to replace an existing backup object with a new backup with a full snapshot, if one already exists. Supported values:The default value is FALSE.
      The default value is an empty Map.
      Returns:
      The current value of options.
    • setOptions

      public CreateBackupRequest setOptions(Map<String,String> options)
      Optional parameters.
      • BLOCK_TABLE_MUTATIONS: Whether or not to block all mutations on target tables while they are being backed up. Supported values:
        • TRUE: Block all mutations on target tables while they are being backed up.
        • FALSE: Only block mutations on a target table at the point a disk eviction is necessary.
        The default value is FALSE.
      • CHECKSUM: Whether or not to calculate checksums for backup files. Supported values:The default value is FALSE.
      • COMMENT: Comments to store with this backup.
      • DDL_ONLY: Whether or not, for tables, to only backup DDL and not table data. Supported values:
        • TRUE: For tables, only back up DDL, not data.
        • FALSE: For tables, back up DDL and data.
        The default value is FALSE.
      • DELETE_INTERMEDIATE_BACKUPS: Whether or not to delete any intermediate snapshots when the backupType is set to DIFFERENTIAL. Supported values:The default value is FALSE.
      • DRY_RUN: Whether or not to perform a dry run of a backup operation. Supported values:The default value is FALSE.
      • MAX_INCREMENTAL_BACKUPS_TO_KEEP: Maximum number of incremental snapshots to keep. The default value is ‘-1’.
      • RECREATE: Whether or not to replace an existing backup object with a new backup with a full snapshot, if one already exists. Supported values:The default value is FALSE.
      The default value is an empty Map.
      Parameters:
      options - The new value for options.
      Returns:
      this to mimic the builder pattern.
    • getSchema

      public org.apache.avro.Schema getSchema()
      This method supports the Avro framework and is not intended to be called directly by the user.
      Specified by:
      getSchema in interface org.apache.avro.generic.GenericContainer
      Returns:
      The schema object describing this class.
    • get

      public Object get(int index)
      This method supports the Avro framework and is not intended to be called directly by the user.
      Specified by:
      get in interface org.apache.avro.generic.IndexedRecord
      Parameters:
      index - the position of the field to get
      Returns:
      value of the field with the given index.
      Throws:
    • put

      public void put(int index, Object value)
      This method supports the Avro framework and is not intended to be called directly by the user.
      Specified by:
      put in interface org.apache.avro.generic.IndexedRecord
      Parameters:
      index - the position of the field to set
      value - the value to set
      Throws:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object