Send feedback
Class Backup Stay organized with collections
Save and categorize content based on your preferences.
Version 5.11.1 keyboard_arrow_down
The Backup
class represents a Cloud Spanner backup.
Create a Backup
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 the Backup
class
Parameters
Properties
formattedName_
:
string
;
Property Value
id
Property Value
instanceFormattedName_
:
string
;
Property Value
metadata
?:
databaseAdmin
.
spanner
.
admin
.
database
.
v1
.
IBackup
;
Property Value
request
request
:
BackupRequest
;
Property Value
resourceHeader_
:
{
[
k
:
string
]
:
string
;
};
Property Value
Methods
create(options)
create
(
options
:
CreateBackupOptions
)
:
Promise<CreateBackupResponse>
;
Parameter
Returns
create(options, callback)
create
(
options
:
CreateBackupOptions
,
callback
:
CreateBackupCallback
)
:
void
;
Parameters
Returns
delete(gaxOptions)
delete
(
gaxOptions
?:
CallOptions
)
:
Promise<databaseAdmin
.
protobuf
.
IEmpty
> ;
Parameter
Returns
delete(callback)
delete
(
callback
:
DeleteCallback
)
:
void
;
Parameter
Returns
delete(gaxOptions, callback)
delete
(
gaxOptions
:
CallOptions
,
callback
:
DeleteCallback
)
:
void
;
Parameters
Returns
exists()
exists
()
:
Promise<boolean>
;
Returns
exists(callback)
exists
(
callback
:
ExistsCallback
)
:
void
;
Parameter
Returns
static
formatName_
(
instanceName
:
string
,
name
:
string
)
:
string
;
Format the backup name to include the instance name.
Parameters
Returns
getExpireTime()
getExpireTime
()
:
Promise<PreciseDate
|
undefined
> ;
Returns
getExpireTime(callback)
getExpireTime
(
callback
:
GetExpireTimeCallback
)
:
void
;
Parameter
Returns
getMetadata
(
gaxOptions
?:
CallOptions
)
:
Promise<GetMetadataResponse>
;
Parameter
Returns
getMetadata
(
callback
:
GetMetadataCallback
)
:
void
;
Parameter
Returns
getMetadata
(
gaxOptions
:
CallOptions
,
callback
:
GetMetadataCallback
)
:
void
;
Parameters
Returns
getState()
getState
()
:
Promise<EnumKey<typeof
databaseAdmin
.
spanner
.
admin
.
database
.
v1
.
Backup
.
State
>
|
undefined
|
null
> ;
Returns
getState(callback)
getState
(
callback
:
GetStateCallback
)
:
void
;
Parameter
Returns
updateExpireTime(expireTime)
updateExpireTime
(
expireTime
:
string
|
number
|
p
.
ITimestamp
|
PreciseDate
)
:
Promise<databaseAdmin
.
spanner
.
admin
.
database
.
v1
.
IBackup
> ;
Parameter
Returns
updateExpireTime(expireTime, gaxOptions)
updateExpireTime
(
expireTime
:
string
|
number
|
p
.
ITimestamp
|
PreciseDate
,
gaxOptions
?:
CallOptions
)
:
Promise<databaseAdmin
.
spanner
.
admin
.
database
.
v1
.
IBackup
> ;
Parameters
Returns
updateExpireTime(expireTime, callback)
updateExpireTime
(
expireTime
:
string
|
number
|
p
.
ITimestamp
|
PreciseDate
,
callback
:
UpdateExpireTimeCallback
)
:
void
;
Parameters
Returns
updateExpireTime(expireTime, gaxOptions, callback)
updateExpireTime
(
expireTime
:
string
|
number
|
p
.
ITimestamp
|
PreciseDate
,
gaxOptions
:
CallOptions
,
callback
:
UpdateExpireTimeCallback
)
:
void
;
Parameters
Returns
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-09-04 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-09-04 UTC."],[],[],null,[]]