If the backup name does not match the expected format or the parsed project ID does not match the project ID on the Instance's client, or if the parsed instance ID does not match the Instance ID.
Retrieves metadata of a pending or completed Backup.
Exceptions
Type
Description
google.api_core.exceptions.GoogleAPICallError
If the request failed for any reason.
google.api_core.exceptions.RetryError
If the request failed due to a retryable error and retry attempts failed.
ValueError
If the parameters are invalid.
get_iam_policy
get_iam_policy()
Gets the IAM access control policy for this backup.
Returns
Type
Description
Policy
The current IAM policy of this backup.
reload
reload()
Refreshes the stored backup properties.
restore
restore(table_id,instance_id=None)
Creates a new Table by restoring from this Backup. The new Table
can be created in the same Instance as the Instance containing the
Backup, or another Instance whose ID can be specified in the arguments.
The returned Tablelong-running operationcan be used to track the
progress of the operation and to cancel it. Theresponsetype isTable, if successful.
Parameters
Name
Description
table_id
str
The ID of the Table to create and restore to. This Table must not already exist.
instance_id
str
(Optional) The ID of the Instance to restore the backup into, if different from the current one.
Exceptions
Type
Description
google.api_core.exceptions.AlreadyExists
If the table already exists.
google.api_core.exceptions.GoogleAPICallError
If the request failed for any reason.
google.api_core.exceptions.RetryError
If the request failed due to a retryable error and retry attempts failed.
ValueError
If the parameters are invalid.
Returns
Type
Description
google.api_core.operation.Operation
A future to be used to poll the status of the 'restore' request.
set_iam_policy
set_iam_policy(policy)
Sets the IAM access control policy for this backup. Replaces any
existing policy.
For more information about policy, please see documentation of
classgoogle.cloud.bigtable.policy.Policy
Parameter
Name
Description
policy
Policy
A new IAM policy to replace the current IAM policy of this backup.
Returns
Type
Description
Policy
The current IAM policy of this backup.
test_iam_permissions
test_iam_permissions(permissions)
Tests whether the caller has the given permissions for this backup.
Returns the permissions that the caller has.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Class Backup (2.32.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.32.0 (latest)](/python/docs/reference/bigtable/latest/google.cloud.bigtable.backup.Backup)\n- [2.31.0](/python/docs/reference/bigtable/2.31.0/google.cloud.bigtable.backup.Backup)\n- [2.30.1](/python/docs/reference/bigtable/2.30.1/google.cloud.bigtable.backup.Backup)\n- [2.29.0](/python/docs/reference/bigtable/2.29.0/google.cloud.bigtable.backup.Backup)\n- [2.28.1](/python/docs/reference/bigtable/2.28.1/google.cloud.bigtable.backup.Backup)\n- [2.26.0](/python/docs/reference/bigtable/2.26.0/google.cloud.bigtable.backup.Backup)\n- [2.25.0](/python/docs/reference/bigtable/2.25.0/google.cloud.bigtable.backup.Backup)\n- [2.24.0](/python/docs/reference/bigtable/2.24.0/google.cloud.bigtable.backup.Backup)\n- [2.23.1](/python/docs/reference/bigtable/2.23.1/google.cloud.bigtable.backup.Backup)\n- [2.22.0](/python/docs/reference/bigtable/2.22.0/google.cloud.bigtable.backup.Backup)\n- [2.21.0](/python/docs/reference/bigtable/2.21.0/google.cloud.bigtable.backup.Backup)\n- [2.20.0](/python/docs/reference/bigtable/2.20.0/google.cloud.bigtable.backup.Backup)\n- [2.19.0](/python/docs/reference/bigtable/2.19.0/google.cloud.bigtable.backup.Backup)\n- [2.18.1](/python/docs/reference/bigtable/2.18.1/google.cloud.bigtable.backup.Backup)\n- [2.17.0](/python/docs/reference/bigtable/2.17.0/google.cloud.bigtable.backup.Backup)\n- [2.16.0](/python/docs/reference/bigtable/2.16.0/google.cloud.bigtable.backup.Backup)\n- [2.15.0](/python/docs/reference/bigtable/2.15.0/google.cloud.bigtable.backup.Backup)\n- [2.14.1](/python/docs/reference/bigtable/2.14.1/google.cloud.bigtable.backup.Backup)\n- [2.13.2](/python/docs/reference/bigtable/2.13.2/google.cloud.bigtable.backup.Backup)\n- [2.12.0](/python/docs/reference/bigtable/2.12.0/google.cloud.bigtable.backup.Backup)\n- [2.11.3](/python/docs/reference/bigtable/2.11.3/google.cloud.bigtable.backup.Backup)\n- [2.10.1](/python/docs/reference/bigtable/2.10.1/google.cloud.bigtable.backup.Backup)\n- [2.9.0](/python/docs/reference/bigtable/2.9.0/google.cloud.bigtable.backup.Backup)\n- [2.8.1](/python/docs/reference/bigtable/2.8.1/google.cloud.bigtable.backup.Backup)\n- [2.7.1](/python/docs/reference/bigtable/2.7.1/google.cloud.bigtable.backup.Backup)\n- [2.6.0](/python/docs/reference/bigtable/2.6.0/google.cloud.bigtable.backup.Backup)\n- [2.5.2](/python/docs/reference/bigtable/2.5.2/google.cloud.bigtable.backup.Backup)\n- [2.4.0](/python/docs/reference/bigtable/2.4.0/google.cloud.bigtable.backup.Backup)\n- [2.3.3](/python/docs/reference/bigtable/2.3.3/google.cloud.bigtable.backup.Backup)\n- [2.2.0](/python/docs/reference/bigtable/2.2.0/google.cloud.bigtable.backup.Backup)\n- [2.1.0](/python/docs/reference/bigtable/2.1.0/google.cloud.bigtable.backup.Backup)\n- [2.0.0](/python/docs/reference/bigtable/2.0.0/google.cloud.bigtable.backup.Backup)\n- [1.7.3](/python/docs/reference/bigtable/1.7.3/google.cloud.bigtable.backup.Backup)\n- [1.6.1](/python/docs/reference/bigtable/1.6.1/google.cloud.bigtable.backup.Backup)\n- [1.5.1](/python/docs/reference/bigtable/1.5.1/google.cloud.bigtable.backup.Backup)\n- [1.4.0](/python/docs/reference/bigtable/1.4.0/google.cloud.bigtable.backup.Backup)\n- [1.3.0](/python/docs/reference/bigtable/1.3.0/google.cloud.bigtable.backup.Backup)\n- [1.2.1](/python/docs/reference/bigtable/1.2.1/google.cloud.bigtable.backup.Backup)\n- [1.1.0](/python/docs/reference/bigtable/1.1.0/google.cloud.bigtable.backup.Backup)\n- [1.0.0](/python/docs/reference/bigtable/1.0.0/google.cloud.bigtable.backup.Backup)\n- [0.34.0](/python/docs/reference/bigtable/0.34.0/google.cloud.bigtable.backup.Backup) \n\n Backup(\n backup_id,\n instance,\n cluster_id=None,\n table_id=None,\n expire_time=None,\n encryption_info=None,\n )\n\nRepresentation of a Google Cloud Bigtable Backup.\n\nA :class: `Backup` can be used to:\n\n- `create` the backup\n- `update` the backup\n- `delete` the backup\n\nProperties\n----------\n\n### cluster\n\nThe ID of the \\[parent\\] cluster used in requests.\n\n### encryption_info\n\nEncryption info for this Backup.\n\n### end_time\n\nThe time this Backup was finished.\n\n### expire_time\n\nExpiration time used in the creation requests.\n\n### name\n\n\u003cbr /\u003e\n\nBackup name used in requests.\n\nThe Backup name is of the form\n\n\u003cbr /\u003e\n\n `\"projects/../instances/../clusters/../backups/{backup_id}\"`\n\n### parent\n\n\u003cbr /\u003e\n\nName of the parent cluster used in requests.\n\n\u003cbr /\u003e\n\n| **Note:** This property will return None if `cluster` is not set.\nThe parent name is of the form\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n `\"projects/{project}/instances/{instance_id}/clusters/{cluster}\"`\n\n### size_bytes\n\nThe size of this Backup, in bytes.\n\n### source_table\n\n\u003cbr /\u003e\n\nThe full name of the Table from which this Backup is created.\n\n\u003cbr /\u003e\n\n| **Note:** This property will return None if `table_id` is not set.\nThe table name is of the form\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n `\"projects/../instances/../tables/{source_table}\"`\n\n### start_time\n\nThe time this Backup was started.\n\n### state\n\nThe current state of this Backup.\n\nMethods\n-------\n\n### create\n\n create(cluster_id=None)\n\nCreates this backup within its instance.\n\n### delete\n\n delete()\n\nDelete this Backup.\n\n### exists\n\n exists()\n\nTests whether this Backup exists.\n\n### from_pb\n\n from_pb(backup_pb, instance)\n\nCreates a Backup instance from a protobuf message.\n\n### get\n\n get()\n\nRetrieves metadata of a pending or completed Backup.\n\n### get_iam_policy\n\n get_iam_policy()\n\nGets the IAM access control policy for this backup.\n\n### reload\n\n reload()\n\nRefreshes the stored backup properties.\n\n### restore\n\n restore(table_id, instance_id=None)\n\nCreates a new Table by restoring from this Backup. The new Table\ncan be created in the same Instance as the Instance containing the\nBackup, or another Instance whose ID can be specified in the arguments.\nThe returned Table `long-running operation` can be used to track the\nprogress of the operation and to cancel it. The `response` type is\n`Table`, if successful.\n\n### set_iam_policy\n\n set_iam_policy(policy)\n\nSets the IAM access control policy for this backup. Replaces any\nexisting policy.\n\nFor more information about policy, please see documentation of\nclass `google.cloud.bigtable.policy.Policy`\n\n### test_iam_permissions\n\n test_iam_permissions(permissions)\n\nTests whether the caller has the given permissions for this backup.\nReturns the permissions that the caller has.\n\n### update_expire_time\n\n update_expire_time(new_expire_time)\n\nUpdate the expire time of this Backup."]]