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.
Parameters
Name for this backup. If the backup already exists, only an incremental or differential backup can be made, unless recreate is set to true.
Type of snapshot to create. Allowed values are:
differential – Snapshot of changes in the database objects and data since the last full snapshot.
full – Snapshot of the given database objects and data.
incremental – Snapshot of changes in the database objects and data since the last snapshot of any kind.
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. Allowed keys are:
all – All object types and data contained in the given schema(s).
catalog – Data Lake catalog that is external to the database.
context – Context(s).
credential – Credential(s).
datasink – Data sink(s).
datasource – Data source(s).
directory – KiFS File directory(ies).
function_environment – Python UDF function environment(s).
graph – Graph definition(s). Source table(s), if applicable, are required in order to restore graph objects.
monitor – Table monitor(s) / SQL stream(s).
resource_group – Resource group(s).
role – Role(s), role members (roles or users, recursively), and associated permissions.
stored_procedure – SQL procedure(s).
table – Table(s) and SQL view(s). Active subscriptions on any tables to be backed up will be temporarily suspended while the backup is active.
user – User(s) (internal and external) and associated permissions.
user_defined_function – UDF(s).
The default value is an empty dict ( ).
Data sink through which the backup will be stored.
Optional parameters. Allowed keys are:
block_table_mutations – Whether or not to block all mutations on target tables while they are being backed up. Allowed values are:
true – Block all mutations on target tables while they are being backed up.
false – Only block mutations on a target table at the point a disk eviction is necessary.
The default value is ‘false’.
checksum – Whether or not to calculate checksums for backup files. Allowed values are:
true
false
The default value is ‘false’.
comment – Comments to store with this backup.
ddl_only – Whether or not, for tables, to only backup DDL and not table data. Allowed values are:
true – For tables, only back up DDL, not data.
false – For tables, back up DDL and data.
The default value is ‘false’.
delete_intermediate_backups – Whether or not to delete any intermediate snapshots when the input parameter backup_type is set to differential. Allowed values are:
true
false
The default value is ‘false’.
dry_run – Whether or not to perform a dry run of a backup operation. Allowed values are:
true
false
The default value is ‘false’.
max_incremental_backups_to_keep – Maximum number of incremental snapshots to keep. The default value is ‘-1’.
recreate – Whether or not to replace an existing backup object with a new backup with a full snapshot, if one already exists. Allowed values are:
true
false
The default value is ‘false’.
The default value is an empty dict ( ).
Returns
A dict with the following entries–
Value of input parameter backup_name.
ID of the snapshot created.
Total size of all files copied for this snapshot.
Total number of files copied for this snapshot.
Total number of records in all files copied for this snapshot.
Total number of records that can be restored from this snapshot.
Additional information.