Skip to main content
  • restoreBackup

    public RestoreBackupResponse restoreBackup(RestoreBackupRequest request) throws GPUdbException
    Restores database objects from a backup accessible via the data source specified by datasourceName.
    Parameters:
    request - Request object containing the parameters for the operation.
    Returns:
    Response object containing the results of the operation.
    Throws:
    GPUdbException - if an error occurs during the operation.
  • restoreBackup

    public RestoreBackupResponse restoreBackup(String backupName, Map<String,String> restoreObjectsMap, String datasourceName, Map<String,String> options) throws GPUdbException
    Restores database objects from a backup accessible via the data source specified by datasourceName.
    Parameters:
    backupName - Name of the backup to restore from, which must refer to an existing backup. The default value is ”.
    restoreObjectsMap - Map of database objects to be restored from the backup.
    datasourceName - Data source through which the backup will be restored.
    options - Optional parameters.
    • BACKUP_ID: ID of the snapshot to restore. Leave empty to restore the most recent snapshot in the backup. The default value is ”.
    • CHECKSUM: Whether or not to verify checksums for backup files when restoring. Supported values:The default value is FALSE.
    • CREATE_SCHEMA_IF_NOT_EXIST: Behavior to apply when the schema containing any database object to restore does not already exist. Supported values:
      • TRUE: If the schema containing any restored object does not exist, create it automatically.
      • FALSE: If the schema containing any restored object does not exist, return an error.
      The default value is TRUE.
    • DDL_ONLY: Behavior to apply when restoring tables. Supported values:
      • TRUE: Restore table DDL, but do not restore data.
      • FALSE: Restore tables and their data.
      The default value is FALSE.
    • DRY_RUN: Whether or not to perform a dry run of the restoration operation. Supported values:The default value is FALSE.
    • RESTORE_SUBSCRIPTIONS: Behavior to apply when restoring datasource subscriptions on tables. Supported values:
      • RESUME: Resume subscriptions that were active when the backup was made.
      • PAUSE: Pause subscriptions that were active when the backup was made.
      • CANCEL: Cancel active subscriptions.
      The default value is RESUME.
    • REINGEST: Behavior to apply when restoring table data. Supported values:
      • TRUE: Restore table data by re-ingesting it. This is the default behavior if the cluster topology differs from that of the contained backup.
      • FALSE: Restore the persisted data files directly.
      The default value is FALSE.
    • RENAMED_OBJECTS_SCHEMA: If the RESTORE_POLICY is RENAME, use this schema for relocated existing objects instead of the default generated one. The default value is ”.
    • RESTORE_ALL_PERMISSIONS: Whether or not all permissions of restored principals should be restored or scoped to the restored objects. Supported values:
      • TRUE: Restore all permissions.
      • FALSE: Restore only permissions on restored objects.
      The default value is FALSE.
    • RESTORE_POLICY: Behavior to apply when any database object to restore already exists. Supported values:
      • NONE: If an object to be restored already exists with the same name, abort and return error.
      • REPLACE: If an object to be restored already exists with the same name, replace it with the backup version.
      • RENAME: If an object to be restored already exists with the same name, move that existing one to the schema specified by RENAMED_OBJECTS_SCHEMA. This policy does not apply to non-schema objects.
      The default value is NONE.
    • TARGET_SCHEMA_MAP: Restore schema-based objects to alternate schema. Value is a comma delimitted list of key:value pairs mapping the original (source) schema name as it exists in the backup to a target (destination) schema namespace: “src: dst [, src: dst [, …]]”. Note that schema names are case sensitive and must adhere to the database schema naming criteria. The default value is ”.
    The default value is an empty Map.
    Returns:
    Response object containing the results of the operation.
    Throws:
    GPUdbException - if an error occurs during the operation.