REST Resource: projects.instances.backups

Resource: Backup

A backup of a Cloud Spanner database.

JSON representation
{
  "database": string,
  "expireTime": string,
  "name": string,
  "createTime": string,
  "sizeBytes": string,
  "state": enum (State),
  "referencingDatabases": [
    string
  ]
}
Fields
database

string

Required for the backups.create operation. Name of the database from which this backup was created. This needs to be in the same instance as the backup. Values are of the form projects/<project>/instances/<instance>/databases/<database>.

expireTime

string (Timestamp format)

Required for the backups.create operation. The expiration time of the backup, with microseconds granularity that must be at least 6 hours and at most 366 days from the time the backups.create request is processed. Once the expireTime has passed, the backup is eligible to be automatically deleted by Cloud Spanner to free the resources used by the backup.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

name

string

Output only for the backups.create operation. Required for the backups.patch operation.

A globally unique identifier for the backup which cannot be changed. Values are of the form projects/<project>/instances/<instance>/backups/[a-z][a-z0-9_\-]*[a-z0-9] The final segment of the name must be between 2 and 60 characters in length.

The backup is stored in the location(s) specified in the instance configuration of the instance containing the backup, identified by the prefix of the backup name of the form projects/<project>/instances/<instance>.

createTime

string (Timestamp format)

Output only. The backup will contain an externally consistent copy of the database at the timestamp specified by createTime. createTime is approximately the time the backups.create request is received.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

sizeBytes

string (int64 format)

Output only. Size of the backup in bytes.

state

enum (State)

Output only. The current state of the backup.

referencingDatabases[]

string

Output only. The names of the restored databases that reference the backup. The database names are of the form projects/<project>/instances/<instance>/databases/<database>. Referencing databases may exist in different instances. The existence of any referencing database prevents the backup from being deleted. When a restored database from the backup enters the READY state, the reference to the backup is removed.

State

Indicates the current state of the backup.

Enums
STATE_UNSPECIFIED Not specified.
CREATING The pending backup is still being created. Operations on the backup may fail with FAILED_PRECONDITION in this state.
READY The backup is complete and ready for use.

Methods

create

Starts creating a new Cloud Spanner Backup.

delete

Deletes a pending or completed Backup.

get

Gets metadata on a pending or completed Backup.

getIamPolicy

Gets the access control policy for a database or backup resource.

list

Lists completed and pending backups.

patch

Updates a pending or completed Backup.

setIamPolicy

Sets the access control policy on a database or backup resource.

testIamPermissions

Returns permissions that the caller has on the specified database or backup resource.