Send feedback
Class Backup (6.57.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 6.57.0 keyboard_arrow_down
public class Backup extends BackupInfo
Represents a Cloud Spanner database backup. Backup
adds a layer of service related
functionality over BackupInfo
.
Methods
create()
public OperationFuture<Backup , CreateBackupMetadata> create ()
Creates a backup on the server based on the source of this Backup instance.
delete()
Deletes this backup on Cloud Spanner.
exists()
Returns true
if a backup with the id of this Backup exists on Cloud
Spanner.
getIAMPolicy()
public Policy getIAMPolicy ()
Returns the IAM Policy for this backup.
Returns Type Description com.google.cloud.Policy
isReady()
Returns true
if this backup is ready to use. The value returned by this method
could be out-of-sync with the value returned by #getState() , as this method will make a
round-trip to the server and return a value based on the response from the server.
listBackupOperations()
public Page<Operation> listBackupOperations ()
Returns all long-running backup operations for this Backup .
reload()
Fetches the backup's current information and returns a new Backup instance. It does not
update this instance.
restore(DatabaseId database)
public OperationFuture<Database , RestoreDatabaseMetadata> restore ( DatabaseId database )
Restores this backup to the specified database. The database must not already exist and will be
created by this call. The database may be created in a different instance than where the backup
is stored.
setIAMPolicy(Policy policy)
public Policy setIAMPolicy ( Policy policy )
Updates the IAM policy for this backup and returns the resulting policy. It is highly
recommended to first get the current policy and base the updated policy on the returned policy.
See Policy.Builder#setEtag(String) for information on the recommended read-modify-write
cycle.
Parameter Name Description policy
com.google.cloud.Policy
Returns Type Description com.google.cloud.Policy
testIAMPermissions(Iterable<String> permissions)
public Iterable<String> testIAMPermissions ( Iterable<String> permissions )
Tests for the given permissions on this backup for the caller.
Parameter Name Description permissions
Iterable <String >
the permissions to test for. Permissions with wildcards (such as '',
'spanner. ', 'spanner.instances.*') are not allowed.
Returns Type Description Iterable <String >
the subset of the tested permissions that the caller is allowed.
toBuilder()
public Backup . Builder toBuilder ()
updateExpireTime()
public void updateExpireTime ()
Updates the expire time of this backup on Cloud Spanner. If this Backup does not have
an expire time, the method will throw an IllegalStateException .
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 2024-09-19 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?
{"lastModified": "Last updated 2024-09-19 UTC."}
[[["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 2024-09-19 UTC."]]