Create Backup

Creates a database backup, containing a snapshot of existing objects, at the remote file store accessible via the data sink specified by input parameter datasink_name.

Input Parameter Description

NameTypeDescription
backup_namestringName for this backup. If the backup already exists, only an incremental or differential backup can be made, unless recreate is set to true.
backup_typestring

Type of snapshot to create.

Supported ValuesDescription
incrementalSnapshot of changes in the database objects & data since the last snapshot of any kind.
differentialSnapshot of changes in the database objects & data since the last full snapshot.
fullSnapshot of the given database objects and data.
backup_objects_mapmap of string to strings

Map of objects to be captured in the backup; must be specified when creating a full snapshot and left unspecified when creating an incremental or differential snapshot.

Supported Parameters (keys)Parameter Description
allAll object types and data contained in the given schemas(s).
tableTables(s) and SQL view(s).
credentialCredential(s).
contextContext(s).
datasinkData sink(s).
datasourceData source(s).
stored_procedureSQL procedure(s).
monitorTable monitor(s) / SQL stream(s).
userUser(s) (internal and external) and associated permissions.
roleRole(s), role members (roles or users, recursively), and associated permissions.
configuration

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

  • true
  • false
datasink_namestringData sink through which the backup will be stored.
optionsmap of string to strings

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

Supported Parameters (keys)Parameter Description
commentComments to store with this backup.
checksum

Whether or not to calculate checksums for backup files. The default value is false. The supported values are:

  • true
  • false
ddl_only

Whether or not, for tables, to only backup DDL and not table data. The default value is false.

Supported ValuesDescription
trueFor tables, only back up DDL, not data.
falseFor tables, back up DDL and data.
max_incremental_backups_to_keepMaximum number of incremental snapshots to keep. The default value is '-1'.
delete_intermediate_backups

Whether or not to delete any intermediate snapshots when the input parameter backup_type is set to differential. The default value is false. The supported values are:

  • true
  • false
recreate

Whether or not to replace an existing backup object with a new backup with a full snapshot, if one already exists. The default value is false. The supported values are:

  • true
  • false
dry_run

Whether or not to perform a dry run of a backup operation. The default value is false. The supported values are:

  • true
  • false

Output Parameter Description

NameTypeDescription
backup_namestringValue of input parameter backup_name.
backup_idlongID of the snapshot created.
copied_byteslongTotal size of all files copied for this snapshot.
copied_fileslongTotal number of files copied for this snapshot.
copied_recordslongTotal number of records in all files copied for this snapshot.
total_number_of_recordslongTotal number of records that can be restored from this snapshot.
infomap of string to stringsAdditional information.