Restore Backup

Restores objects from a backup instance. Response from a backup restoration operation.

Input Parameter Description

NameTypeDescription
backup_namestringName of the backup object, which must refer to a currently existing backup. The default value is ''.
restore_objects_mapmap of string to strings

Map of objects to be restored from the backup. Error if empty.

Supported Parameters (keys)Parameter Description
allAll object types in a schema (excludes permissions, system configuration, host secret key, KiFS directories and user defined functions)
tableDatabase Table
credentialCredential
contextContext
datasinkData Sink
datasourceData Source
stored_procedureSQL Procedure
monitorTable Monitor (Stream)
userUser (internal and external) and associated permissions
roleRole, role members (roles or users, recursively) and associated permissions
configuration

If true, restore the database configuration file The default value is false. The supported values are:

  • false
  • true
datasource_namestringDatasource where backup is located.
optionsmap of string to strings

Optional parameters. The default value is an empty map ( {} ).

Supported Parameters (keys)Parameter Description
backup_idBackup 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 The default value is none.

Supported ValuesDescription
noneIf an object to be restored currently exists with the same name, abort and return error
replaceIf an object to be restored currently exists with the same name, replace it with the backup version
renameIf an object to be restored currently exists with the same name, rename the original version
renamed_objects_schemaIf 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. The default value is true. The supported values are:

  • false
  • true
ddl_only

Only recreates the objects from their DDL, do not restore table data The default value is false. The supported values are:

  • true
  • false
checksum

Verify checksum for backup files The default value is true. The supported values are:

  • false
  • true
dry_run

Does a dry-run restoration operation The default value is false. The supported values are:

  • true
  • false

Output Parameter Description

NameTypeDescription
backup_namestringThe backup name
backup_idlongThe backup ID that was restored
restored_byteslongTotal size of data restored from backup
restored_fileslongTotal number of files restored from backup
restored_recordslongTotal number of records restored from backup
restored_objectsmap of string to stringsObjects that were successfully restored and their associated types.
renamed_objectsmap of string to stringsOriginal and new names of objects that were successfully restored and their associated types.
failed_objectsmap of string to stringsObjects that failed to be restored and their associated types.
infomap of string to stringsAdditional information.