Package com.gpudb.protocol
Class RestoreBackupRequest.Options
java.lang.Object
com.gpudb.protocol.RestoreBackupRequest.Options
Enclosing class:
A set of string constants for the
RestoreBackupRequest parameter options.
Optional parameters.
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringID of the snapshot to restore.static final StringCancel active subscriptions.static final StringWhether to drop live foreign-key-referencing tables that are not themselves part of the backup, when the table they reference is being replaced.static final StringWhether or not to verify checksums for backup files when restoring.static final StringBefore restoring, drop every existing object of each object type being restored, whether or not that object is in the backup, including objects that are not persisted; object types not being restored are left untouched, and schemas are not dropped.static final StringBefore restoring, drop every existing object in the database, regardless of which objects are being restored, including users, roles, non-system schemas and objects that are not persisted.static final StringBehavior to apply when the schema containing any database object to restore does not already exist.static final StringBehavior to apply when restoring tables.static final StringWhether or not to perform a dry run of the restoration operation.static final StringRestore only permissions on restored objects.static final StringIf an object to be restored already exists with the same name, abort and return error.static final StringPause subscriptions that were active when the backup was made.static final StringBehavior to apply when restoring table data.static final StringIf an object to be restored already exists with the same name, move that existing one to the schema specified byRENAMED_OBJECTS_SCHEMA.static final StringIf theRESTORE_POLICYisRENAME, use this schema for relocated existing objects instead of the default generated one.static final StringIf an object to be restored already exists with the same name, replace it with the backup version.static final StringWhether or not all permissions of restored principals should be restored or scoped to the restored objects.static final StringBehavior to apply when any database object to restore already exists.static final StringBehavior to apply when restoring datasource subscriptions on tables.static final StringResume subscriptions that were active when the backup was made.static final StringRestore schema-based objects to alternate schema.static final StringRestore all permissions.
Field Details
CASCADE_FOREIGN_KEYS
Whether to drop live foreign-key-referencing tables that are not themselves part of the backup, when the table they reference is being replaced. Only applies whenRESTORE_POLICYisREPLACE. Supported values:TRUE: Drop any live table whose foreign key references a table being replaced, even when that table is not in the backup and therefore will not be restored.FALSE: Fail the restore of a table that is referenced by a live foreign-key table which is not part of the backup, rather than destroying data the backup cannot restore.
FALSE.See Also: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.See Also:DRY_RUN
Whether or not to perform a dry run of the restoration operation. With aRESTORE_POLICYofCLEANorCLEAN_ALL, a dry run lists the objects the clean would drop in theCLEAN_DROPPED_OBJECTSentry of the responseinfomap and drops nothing, and fails as the restore would if the clean is refused. Supported values:The default value isFALSE.See Also: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.
RESUME.See Also:RENAMED_OBJECTS_SCHEMA
If theRESTORE_POLICYisRENAME, use this schema for relocated existing objects instead of the default generated one. The default value is ”.See Also:RESTORE_ALL_PERMISSIONS
Whether or not all permissions of restored principals should be restored or scoped to the restored objects. WhenRESTORE_POLICYisCLEANorCLEAN_ALL, the default isTRUE: the clean drops each principal in scope along with all of its permissions, including those on objects it does not drop. Supported values:The default value isFALSE.See Also: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. Only objects in the backup are dropped; existing objects that are not in the backup are kept, so the result is a merge of the backup into the database. To drop those as well, useCLEAN.RENAME: If an object to be restored already exists with the same name, move that existing one to the schema specified byRENAMED_OBJECTS_SCHEMA. This policy does not apply to non-schema objects.CLEAN: Before restoring, drop every existing object of each object type being restored, whether or not that object is in the backup, including objects that are not persisted; object types not being restored are left untouched, and schemas are not dropped. UnlikeREPLACE, the clean is scoped by object type, not by name: restoring a single table drops every table in the database first, and the response warns when the objects to restore name specific objects of a type rather than all of them. UseDRY_RUNto list the objects that would be dropped. The restore is refused, before anything is dropped, if an object that would be dropped is still used by an object of a type that is not being restored, or cannot be dropped, such as a table locked by a backup in progress. As graphs, contexts, table monitors and stored procedures all depend on tables, restoring tables requires restoring each of those types of which any objects exist. A data sink generated for a monitor is dropped along with the monitor, and a home directory only along with its user. Objects created by other sessions while the restore runs are not dropped. If the restore fails after the clean, the dropped objects are not put back. System objects, the data source being restored from and its credential, the calling user and admin, with their default schemas, home directories and resource groups, and the calling user’s roles are never dropped, nor are the schemas holding any of these. Requires system administrator permission.CLEAN_ALL: Before restoring, drop every existing object in the database, regardless of which objects are being restored, including users, roles, non-system schemas and objects that are not persisted. The restore is refused, before anything is dropped, if an object cannot be dropped, such as a table locked by a backup in progress, or is still used by an object the clean keeps, such as a resource group a system user is in; it also requiresCREATE_SCHEMA_IF_NOT_EXISTto beTRUE. If the restore fails after the clean, the dropped objects are not put back. System objects, the data source being restored from and its credential, the calling user and admin, with their default schemas, home directories and resource groups, and the calling user’s roles are never dropped, nor are the schemas holding any of these. Requires system administrator permission.
NONE.See Also:REPLACE
If an object to be restored already exists with the same name, replace it with the backup version. Only objects in the backup are dropped; existing objects that are not in the backup are kept, so the result is a merge of the backup into the database. To drop those as well, useCLEAN.See Also:RENAME
If an object to be restored already exists with the same name, move that existing one to the schema specified byRENAMED_OBJECTS_SCHEMA. This policy does not apply to non-schema objects.See Also:CLEAN
Before restoring, drop every existing object of each object type being restored, whether or not that object is in the backup, including objects that are not persisted; object types not being restored are left untouched, and schemas are not dropped. UnlikeREPLACE, the clean is scoped by object type, not by name: restoring a single table drops every table in the database first, and the response warns when the objects to restore name specific objects of a type rather than all of them. UseDRY_RUNto list the objects that would be dropped. The restore is refused, before anything is dropped, if an object that would be dropped is still used by an object of a type that is not being restored, or cannot be dropped, such as a table locked by a backup in progress. As graphs, contexts, table monitors and stored procedures all depend on tables, restoring tables requires restoring each of those types of which any objects exist. A data sink generated for a monitor is dropped along with the monitor, and a home directory only along with its user. Objects created by other sessions while the restore runs are not dropped. If the restore fails after the clean, the dropped objects are not put back. System objects, the data source being restored from and its credential, the calling user and admin, with their default schemas, home directories and resource groups, and the calling user’s roles are never dropped, nor are the schemas holding any of these. Requires system administrator permission.See Also:CLEAN_ALL
Before restoring, drop every existing object in the database, regardless of which objects are being restored, including users, roles, non-system schemas and objects that are not persisted. The restore is refused, before anything is dropped, if an object cannot be dropped, such as a table locked by a backup in progress, or is still used by an object the clean keeps, such as a resource group a system user is in; it also requiresCREATE_SCHEMA_IF_NOT_EXISTto beTRUE. If the restore fails after the clean, the dropped objects are not put back. System objects, the data source being restored from and its credential, the calling user and admin, with their default schemas, home directories and resource groups, and the calling user’s roles are never dropped, nor are the schemas holding any of these. Requires system administrator permission.See Also: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 ”.See Also: