Send feedback
Class Backup (5.1.2)
Stay organized with collections
Save and categorize content based on your preferences.
Version latest keyboard_arrow_down
Interact with backups like get detailed information from BigTable, create a backup, or restore a backup to a table.
Package
@google-cloud/bigtable
Example
const { Bigtable } = require ( '@google-cloud/bigtable' );
const bigtable = new Bigtable ();
const instance = bigtable . instance ( 'my-instance' );
const cluster = instance . cluster ( 'my-cluster' );
const backup = cluster . backup ( 'my-backup' );
Constructors
(constructor)(cluster, id)
constructor ( cluster : Cluster , id : string );
Constructs a new instance of the Backup
class
Parameters
Name
Description
cluster
Cluster
id
string
The backup name or id.
Properties
bigtable
cluster
endDate
get endDate () : PreciseDate ;
A Date-compatible PreciseDate representing the time that the backup was finished.
{PreciseDate}
expireDate
get expireDate () : PreciseDate ;
A Date-compatible PreciseDate representing the expiration time of this backup.
{PreciseDate}
id
A unique backup string, e.g. "my-backup".
name
The full path of the backup which is in the form of: projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}
.
startDate
get startDate () : PreciseDate ;
A Date-compatible PreciseDate representing the time that this backup was started.
{PreciseDate}
Methods
copy(config, callback)
copy ( config : CopyBackupConfig , callback : CopyBackupCallback ) : void ;
When this backup object represents a backup that has already been created, copy will copy this created backup to the location and with the settings specified by the config parameter. After running this function the original backup will exist as well as a second backup matching the parameters given by the config argument.
Parameters
Name
Description
config
CopyBackupConfig
The config that specifies all of the information about the destination backup which is the new backup that gets created as a result of calling copy.
callback
CopyBackupCallback
The callback function that passes an error or results back to the user.
Returns
Type
Description
void
copy(config)
copy ( config : CopyBackupConfig ) : Promise<CopyBackupResponse> ;
Parameter
Name
Description
config
CopyBackupConfig
Returns
Type
Description
Promise <CopyBackupResponse >
create(config, callback)
create ( config : CreateBackupConfig , callback ?: CreateBackupCallback ) : void ;
Returns
Type
Description
void
create(config)
create ( config : CreateBackupConfig ) : Promise<CreateBackupResponse> ;
Parameter
Name
Description
config
CreateBackupConfig
delete(gaxOptions)
delete ( gaxOptions ?: CallOptions ) : Promise<DeleteBackupResponse> ;
Parameter
Name
Description
gaxOptions
CallOptions
delete(callback)
delete ( callback : DeleteBackupCallback ) : void ;
Returns
Type
Description
void
delete(gaxOptions, callback)
delete ( gaxOptions : CallOptions , callback : DeleteBackupCallback ) : void ;
Returns
Type
Description
void
exists(gaxOptions)
exists ( gaxOptions ?: CallOptions ) : Promise<BackupExistsResponse> ;
Parameter
Name
Description
gaxOptions
CallOptions
Returns
Type
Description
Promise <BackupExistsResponse >
exists(gaxOptions, callback)
exists ( gaxOptions : CallOptions , callback : BackupExistsCallback ) : void ;
Parameters
Name
Description
gaxOptions
CallOptions
callback
BackupExistsCallback
Returns
Type
Description
void
exists(callback)
exists ( callback : BackupExistsCallback ) : void ;
Parameter
Name
Description
callback
BackupExistsCallback
Returns
Type
Description
void
get(gaxOptions)
get ( gaxOptions ?: CallOptions ) : Promise<GetBackupResponse> ;
Parameter
Name
Description
gaxOptions
CallOptions
get(callback)
get ( callback : GetBackupCallback ) : void ;
Returns
Type
Description
void
get(gaxOptions, callback)
get ( gaxOptions : CallOptions , callback : GetBackupCallback ) : void ;
Returns
Type
Description
void
getIamPolicy(options)
getIamPolicy ( options ?: GetIamPolicyOptions ) : Promise<GetIamPolicyResponse> ;
getIamPolicy(options, callback)
getIamPolicy ( options : GetIamPolicyOptions , callback : GetIamPolicyCallback ) : void ;
Returns
Type
Description
void
getMetadata ( gaxOptions ?: CallOptions ) : Promise<BackupGetMetadataResponse> ;
Parameter
Name
Description
gaxOptions
CallOptions
getMetadata ( callback : BackupGetMetadataCallback ) : void ;
Returns
Type
Description
void
getMetadata ( gaxOptions : CallOptions , callback : BackupGetMetadataCallback ) : void ;
Returns
Type
Description
void
restore(tableId, gaxOptions)
restore ( tableId : string , gaxOptions ?: CallOptions ) : Promise<RestoreTableResponse> ;
Parameters
Name
Description
tableId
string
gaxOptions
CallOptions
restore(tableId, gaxOptions, callback)
restore ( tableId : string , gaxOptions : CallOptions , callback : RestoreTableCallback ) : void ;
Returns
Type
Description
void
restore(tableId, callback)
restore ( tableId : string , callback : RestoreTableCallback ) : void ;
Returns
Type
Description
void
restoreTo(config)
restoreTo ( config : RestoreTableConfig ) : Promise<RestoreTableResponse> ;
Parameter
Name
Description
config
RestoreTableConfig
restoreTo(config, callback)
restoreTo ( config : RestoreTableConfig , callback : RestoreTableCallback ) : void ;
Returns
Type
Description
void
setIamPolicy(policy, gaxOptions)
setIamPolicy ( policy : Policy , gaxOptions ?: CallOptions ) : Promise<SetIamPolicyResponse> ;
Parameters
Name
Description
policy
Policy
gaxOptions
CallOptions
setIamPolicy(policy, gaxOptions, callback)
setIamPolicy ( policy : Policy , gaxOptions : CallOptions , callback : SetIamPolicyCallback ) : void ;
Returns
Type
Description
void
setIamPolicy(policy, callback)
setIamPolicy ( policy : Policy , callback : SetIamPolicyCallback ) : void ;
Returns
Type
Description
void
setMetadata ( metadata : ModifiableBackupFields , gaxOptions ?: CallOptions ) : Promise<BackupSetMetadataResponse> ;
setMetadata ( metadata : ModifiableBackupFields , callback : BackupSetMetadataCallback ) : void ;
Returns
Type
Description
void
setMetadata ( metadata : ModifiableBackupFields , gaxOptions : CallOptions , callback : BackupSetMetadataCallback ) : void ;
Returns
Type
Description
void
testIamPermissions(permissions, gaxOptions)
testIamPermissions ( permissions : string | string [], gaxOptions ?: CallOptions ) : Promise<TestIamPermissionsResponse> ;
Parameters
Name
Description
permissions
string | string[]
gaxOptions
CallOptions
testIamPermissions(permissions, callback)
testIamPermissions ( permissions : string | string [], callback : TestIamPermissionsCallback ) : void ;
Returns
Type
Description
void
testIamPermissions(permissions, gaxOptions, callback)
testIamPermissions ( permissions : string | string [], gaxOptions : CallOptions , callback : TestIamPermissionsCallback ) : void ;
Returns
Type
Description
void
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-01-08 UTC.
Need to tell us more?
[[["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-01-08 UTC."],[],[]]