public class RestoreBackupRequest extends Object implements org.apache.avro.generic.IndexedRecord
GPUdb.restoreBackup
.
Restores objects from a backup instance. Response from a backup restoration operation.
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 object, which must refer to a currently 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()
Datasource where backup is located.
|
Map<String,String> |
getOptions()
Optional parameters.
|
Map<String,String> |
getRestoreObjectsMap()
Map of 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 object, which must refer to a currently existing
backup.
|
RestoreBackupRequest |
setDatasourceName(String datasourceName)
Datasource where backup is located.
|
RestoreBackupRequest |
setOptions(Map<String,String> options)
Optional parameters.
|
RestoreBackupRequest |
setRestoreObjectsMap(Map<String,String> restoreObjectsMap)
Map of 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 object, which must refer to a
currently existing backup. The default value is ''.restoreObjectsMap
- Map of objects to be restored from the backup.
Error if empty.
ALL
: All
object types in a schema (excludes
permissions, system configuration,
host secret key, KiFS directories and
user defined functions)
TABLE
:
Database Table
CREDENTIAL
: Credential
CONTEXT
: Context
DATASINK
: Data Sink
DATASOURCE
: Data Source
STORED_PROCEDURE
: SQL Procedure
MONITOR
: Table Monitor (Stream)
USER
:
User (internal and external) and
associated permissions
ROLE
:
Role, 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
- Datasource where backup is located.options
- Optional parameters.
BACKUP_ID
: Backup
instance ID to restore. Leave empty to restore
the most recent backup instance. The default
value is ''.
RESTORE_POLICY
:
Behavior to apply when restoring objects that
already exist.
Supported values:
NONE
: If an object
to be restored currently exists with the
same name, abort and return error
REPLACE
: If an
object to be restored currently exists
with the same name, replace it with the
backup version
RENAME
: If an
object to be restored currently exists
with the same name, rename the original
version
NONE
.
RENAMED_OBJECTS_SCHEMA
: If the restore policy
is rename, optionally use this schema for
renamed objects instead of a default generated
one. The default value is ''.
CREATE_SCHEMA_IF_NOT_EXIST
: Create the schema
for an object to be restored if it does not
currently exist. Error otherwise.
Supported values:
The default value is TRUE
.
DDL_ONLY
: Only
recreates the objects from their DDL, do not
restore table data.
Supported values:
The default value is FALSE
.
CHECKSUM
: Verify
checksum for backup files.
Supported values:
The default value is TRUE
.
DRY_RUN
: Does a dry-run
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 in a schema
(excludes permissions, system configuration, host secret key,
KiFS directories and user defined functions)
TABLE
: Database Table
CREDENTIAL
: Credential
CONTEXT
: Context
DATASINK
: Data Sink
DATASOURCE
: Data Source
STORED_PROCEDURE
: SQL
Procedure
MONITOR
: Table Monitor
(Stream)
USER
: User (internal and
external) and associated permissions
ROLE
: Role, 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 in a schema
(excludes permissions, system configuration, host secret key,
KiFS directories and user defined functions)
TABLE
: Database Table
CREDENTIAL
: Credential
CONTEXT
: Context
DATASINK
: Data Sink
DATASOURCE
: Data Source
STORED_PROCEDURE
: SQL
Procedure
MONITOR
: Table Monitor
(Stream)
USER
: User (internal and
external) and associated permissions
ROLE
: Role, 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
: Backup instance ID to
restore. Leave empty to restore the most recent backup instance.
The default value is ''.
RESTORE_POLICY
: Behavior to apply
when restoring objects that already exist.
Supported values:
NONE
: If an object to be restored
currently exists with the same name, abort and return
error
REPLACE
: If an object to be
restored currently exists with the same name, replace it
with the backup version
RENAME
: If an object to be
restored currently exists with the same name, rename the
original version
NONE
.
RENAMED_OBJECTS_SCHEMA
:
If the restore policy is rename, optionally use this schema for
renamed objects instead of a default generated one. The default
value is ''.
CREATE_SCHEMA_IF_NOT_EXIST
: Create the schema for an object to
be restored if it does not currently exist. Error otherwise.
Supported values:
The default value is TRUE
.
DDL_ONLY
: Only recreates the objects
from their DDL, do not restore table data.
Supported values:
The default value is FALSE
.
CHECKSUM
: Verify checksum for backup
files.
Supported values:
The default value is TRUE
.
DRY_RUN
: Does a dry-run restoration
operation.
Supported values:
The default value is FALSE
.
Map
.options
.public RestoreBackupRequest setOptions(Map<String,String> options)
BACKUP_ID
: Backup instance ID to
restore. Leave empty to restore the most recent backup instance.
The default value is ''.
RESTORE_POLICY
: Behavior to apply
when restoring objects that already exist.
Supported values:
NONE
: If an object to be restored
currently exists with the same name, abort and return
error
REPLACE
: If an object to be
restored currently exists with the same name, replace it
with the backup version
RENAME
: If an object to be
restored currently exists with the same name, rename the
original version
NONE
.
RENAMED_OBJECTS_SCHEMA
:
If the restore policy is rename, optionally use this schema for
renamed objects instead of a default generated one. The default
value is ''.
CREATE_SCHEMA_IF_NOT_EXIST
: Create the schema for an object to
be restored if it does not currently exist. Error otherwise.
Supported values:
The default value is TRUE
.
DDL_ONLY
: Only recreates the objects
from their DDL, do not restore table data.
Supported values:
The default value is FALSE
.
CHECKSUM
: Verify checksum for backup
files.
Supported values:
The default value is TRUE
.
DRY_RUN
: Does a dry-run 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.GenericContainer
public Object get(int index)
get
in interface org.apache.avro.generic.IndexedRecord
index
- the position of the field to getIndexOutOfBoundsException
public void put(int index, Object value)
put
in interface org.apache.avro.generic.IndexedRecord
index
- the position of the field to setvalue
- the value to setIndexOutOfBoundsException
Copyright © 2025. All rights reserved.