public class RestoreBackupRequest extends Object implements org.apache.avro.generic.IndexedRecord
GPUdb.restoreBackup.
Restores database objects from a backup accessible via the data
source specified by datasourceName.
| Modifier and Type | Class and Description |
|---|---|
static class |
RestoreBackupRequest.Options
A set of string constants for the
RestoreBackupRequest parameter
options. |
static class |
RestoreBackupRequest.RestoreObjectsMap
A set of string constants for the
RestoreBackupRequest parameter
restoreObjectsMap. |
| Constructor and Description |
|---|
RestoreBackupRequest()
Constructs a RestoreBackupRequest object with default parameters.
|
RestoreBackupRequest(String backupName,
Map<String,String> restoreObjectsMap,
String datasourceName,
Map<String,String> options)
Constructs a RestoreBackupRequest object with the specified parameters.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Object |
get(int index)
This method supports the Avro framework and is not intended to be called
directly by the user.
|
String |
getBackupName()
Name of the backup to restore from, which must refer to an existing
backup.
|
static org.apache.avro.Schema |
getClassSchema()
This method supports the Avro framework and is not intended to be called
directly by the user.
|
String |
getDatasourceName()
Data source through which the backup will be restored.
|
Map<String,String> |
getOptions()
Optional parameters.
|
Map<String,String> |
getRestoreObjectsMap()
Map of database objects to be restored from the backup.
|
org.apache.avro.Schema |
getSchema()
This method supports the Avro framework and is not intended to be called
directly by the user.
|
int |
hashCode() |
void |
put(int index,
Object value)
This method supports the Avro framework and is not intended to be called
directly by the user.
|
RestoreBackupRequest |
setBackupName(String backupName)
Name of the backup to restore from, which must refer to an existing
backup.
|
RestoreBackupRequest |
setDatasourceName(String datasourceName)
Data source through which the backup will be restored.
|
RestoreBackupRequest |
setOptions(Map<String,String> options)
Optional parameters.
|
RestoreBackupRequest |
setRestoreObjectsMap(Map<String,String> restoreObjectsMap)
Map of database objects to be restored from the backup.
|
String |
toString() |
public RestoreBackupRequest()
public RestoreBackupRequest(String backupName, Map<String,String> restoreObjectsMap, String datasourceName, Map<String,String> options)
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.
ALL: All
object types and data contained in the
given schemas(s).
TABLE:
Tables(s) and SQL view(s).
CREDENTIAL: Credential(s).
CONTEXT: Context(s).
DATASINK: Data sink(s).
DATASOURCE: Data source(s).
STORED_PROCEDURE: SQL procedure(s).
MONITOR: Table monitor(s) /
SQL stream(s).
USER:
User(s) (internal
and external) and associated
permissions.
ROLE:
Role(s), role
members (roles or users, recursively),
and associated permissions.
CONFIGURATION: If TRUE, restore
the database configuration file.
Supported values:
The default value is FALSE.
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 ''.
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.
NONE.
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 ''.
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.
TRUE.
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.
FALSE.
DDL_ONLY: Behavior to
apply when restoring tables.
Supported values:
The default value is FALSE.
CHECKSUM: Whether or
not to verify checksums for backup files when
restoring.
Supported values:
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.
Map.public static org.apache.avro.Schema getClassSchema()
public String getBackupName()
backupName.public RestoreBackupRequest setBackupName(String backupName)
backupName - The new value for backupName.this to mimic the builder pattern.public Map<String,String> getRestoreObjectsMap()
ALL: All object types and data
contained in the given schemas(s).
TABLE: Tables(s) and SQL
view(s).
CREDENTIAL: Credential(s).
CONTEXT: Context(s).
DATASINK: Data
sink(s).
DATASOURCE: Data source(s).
STORED_PROCEDURE: SQL
procedure(s).
MONITOR: Table monitor(s) / SQL stream(s).
USER: User(s) (internal and external) and associated
permissions.
ROLE: Role(s), role members (roles or users,
recursively), and associated permissions.
CONFIGURATION: If TRUE, restore the database configuration
file.
Supported values:
The default value is FALSE.
restoreObjectsMap.public RestoreBackupRequest setRestoreObjectsMap(Map<String,String> restoreObjectsMap)
ALL: All object types and data
contained in the given schemas(s).
TABLE: Tables(s) and SQL
view(s).
CREDENTIAL: Credential(s).
CONTEXT: Context(s).
DATASINK: Data
sink(s).
DATASOURCE: Data source(s).
STORED_PROCEDURE: SQL
procedure(s).
MONITOR: Table monitor(s) / SQL stream(s).
USER: User(s) (internal and external) and associated
permissions.
ROLE: Role(s), role members (roles or users,
recursively), and associated permissions.
CONFIGURATION: If TRUE, restore the database configuration
file.
Supported values:
The default value is FALSE.
restoreObjectsMap - The new value for restoreObjectsMap.this to mimic the builder pattern.public String getDatasourceName()
datasourceName.public RestoreBackupRequest setDatasourceName(String datasourceName)
datasourceName - The new value for datasourceName.this to mimic the builder pattern.public Map<String,String> getOptions()
BACKUP_ID: ID of the snapshot to
restore. Leave empty to restore the most recent snapshot in the
backup. The default value is ''.
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.
NONE.
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 ''.
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.
TRUE.
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.
FALSE.
DDL_ONLY: Behavior to apply when
restoring tables.
Supported values:
The default value is FALSE.
CHECKSUM: Whether or not to verify
checksums for backup files when restoring.
Supported values:
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.
Map.options.public RestoreBackupRequest setOptions(Map<String,String> options)
BACKUP_ID: ID of the snapshot to
restore. Leave empty to restore the most recent snapshot in the
backup. The default value is ''.
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.
NONE.
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 ''.
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.
TRUE.
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.
FALSE.
DDL_ONLY: Behavior to apply when
restoring tables.
Supported values:
The default value is FALSE.
CHECKSUM: Whether or not to verify
checksums for backup files when restoring.
Supported values:
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.
Map.options - The new value for options.this to mimic the builder pattern.public org.apache.avro.Schema getSchema()
getSchema in interface org.apache.avro.generic.GenericContainerpublic Object get(int index)
get in interface org.apache.avro.generic.IndexedRecordindex - the position of the field to getIndexOutOfBoundsExceptionpublic void put(int index,
Object value)
put in interface org.apache.avro.generic.IndexedRecordindex - the position of the field to setvalue - the value to setIndexOutOfBoundsExceptionCopyright © 2025. All rights reserved.