Send feedback Class Backup Stay organized with collections Save and categorize content based on your preferences. Version 5.8.1keyboard_arrow_down TheBackup class represents a Cloud Spanner backup.
Create aBackup object to interact with or create a Cloud Spanner backup.
Package @google-cloud/spanner! Constructors (constructor)(instance, name)
constructor ( instance : Instance , name : string ); Constructs a new instance of theBackup class
Parameters Type Name Description Instance instance string name
Properties formattedName_ Property Value id Property Value instanceFormattedName_
instanceFormattedName_ : string ; Property Value metadata
metadata ?: databaseAdmin . spanner . admin . database . v1 . IBackup ; Property Value Type Description databaseAdmin.spanner.admin.database.v1.IBackup
request Property Value Type Description BackupRequest
resourceHeader_
resourceHeader_ : { [ k : string ] : string ; }; Property Value Type Description { [k: string]: string; }
Methods create(options)
create ( options : CreateBackupOptions ) : Promise<CreateBackupResponse> ; Parameter Type Name Description CreateBackupOptions options
Returns Type Description Promise <CreateBackupResponse >
create(options, callback)
create ( options : CreateBackupOptions , callback : CreateBackupCallback ) : void ; Parameters Type Name Description CreateBackupOptions options CreateBackupCallback callback
Returns delete(gaxOptions)
delete ( gaxOptions ?: CallOptions ) : Promise<databaseAdmin . protobuf . IEmpty >; Parameter Type Name Description CallOptions gaxOptions
Returns Type Description Promise <google.protobuf.IEmpty >
delete(callback)
delete ( callback : DeleteCallback ) : void ; Parameter Type Name Description DeleteCallback callback
Returns delete(gaxOptions, callback)
delete ( gaxOptions : CallOptions , callback : DeleteCallback ) : void ; Parameters Type Name Description CallOptions gaxOptions DeleteCallback callback
Returns exists()
exists () : Promise<boolean> ; Returns Type Description Promise <boolean>
exists(callback)
exists ( callback : ExistsCallback ) : void ; Parameter Type Name Description ExistsCallback callback
Returns formatName_(instanceName, name)
static formatName_ ( instanceName : string , name : string ) : string ; Format the backup name to include the instance name.
Parameters Type Name Description string instanceName The formatted instance name.
string name The table name.
Returns Type Description string {string}
getExpireTime()
getExpireTime () : Promise<PreciseDate | undefined >; Returns Type Description Promise <PreciseDate | undefined>
getExpireTime(callback)
getExpireTime ( callback : GetExpireTimeCallback ) : void ; Parameter Type Name Description GetExpireTimeCallback callback
Returns getMetadata(gaxOptions)
getMetadata ( gaxOptions ?: CallOptions ) : Promise<GetMetadataResponse> ; Parameter Type Name Description CallOptions gaxOptions
Returns Type Description Promise <GetMetadataResponse >
getMetadata(callback)
getMetadata ( callback : GetMetadataCallback ) : void ; Parameter Type Name Description GetMetadataCallback callback
Returns getMetadata(gaxOptions, callback)
getMetadata ( gaxOptions : CallOptions , callback : GetMetadataCallback ) : void ; Parameters Type Name Description CallOptions gaxOptions GetMetadataCallback callback
Returns getState()
getState () : Promise<EnumKey<typeof databaseAdmin . spanner . admin . database . v1 . Backup . State >| undefined | null >; Returns Type Description Promise <EnumKey <typeofgoogle.spanner.admin.database.v1.Backup.State > | undefined | null>
getState(callback)
getState ( callback : GetStateCallback ) : void ; Parameter Type Name Description GetStateCallback callback
Returns updateExpireTime(expireTime)
updateExpireTime ( expireTime : string | number | p . ITimestamp | PreciseDate ) : Promise<databaseAdmin . spanner . admin . database . v1 . IBackup >; Parameter Type Name Description string | number |common.ITimestamp |PreciseDate expireTime
Returns Type Description Promise <google.spanner.admin.database.v1.IBackup >
updateExpireTime(expireTime, gaxOptions)
updateExpireTime ( expireTime : string | number | p . ITimestamp | PreciseDate , gaxOptions ?: CallOptions ) : Promise<databaseAdmin . spanner . admin . database . v1 . IBackup >; Parameters Type Name Description string | number |common.ITimestamp |PreciseDate expireTime CallOptions gaxOptions
Returns Type Description Promise <google.spanner.admin.database.v1.IBackup >
updateExpireTime(expireTime, callback)
updateExpireTime ( expireTime : string | number | p . ITimestamp | PreciseDate , callback : UpdateExpireTimeCallback ) : void ; Parameters Type Name Description string | number |common.ITimestamp |PreciseDate expireTime UpdateExpireTimeCallback callback
Returns updateExpireTime(expireTime, gaxOptions, callback)
updateExpireTime ( expireTime : string | number | p . ITimestamp | PreciseDate , gaxOptions : CallOptions , callback : UpdateExpireTimeCallback ) : void ; Parameters Type Name Description string | number |common.ITimestamp |PreciseDate expireTime CallOptions gaxOptions UpdateExpireTimeCallback callback
Returns Send feedback
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License , and code samples are licensed under theApache 2.0 License . For details, see theGoogle Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-10-30 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-10-30 UTC."],[],[]]