REST Resource: projects.instances.backups

Resource: Backup

A backup of a Cloud Spanner database.

JSON representation
{
  "database": string,
  "versionTime": string,
  "expireTime": string,
  "name": string,
  "createTime": string,
  "sizeBytes": string,
  "state": enum (State),
  "referencingDatabases": [
    string
  ],
  "encryptionInfo": {
    object (EncryptionInfo)
  },
  "databaseDialect": enum (DatabaseDialect),
  "referencingBackups": [
    string
  ],
  "maxExpireTime": 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>.

versionTime

string (Timestamp format)

The backup will contain an externally consistent copy of the database at the timestamp specified by versionTime. If versionTime is not specified, the system will set versionTime to the createTime of 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".

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 time the backups.create request is received. If the request does not specify versionTime, the versionTime of the backup will be equivalent to the createTime.

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.

encryptionInfo

object (EncryptionInfo)

Output only. The encryption information for the backup.

databaseDialect

enum (DatabaseDialect)

Output only. The database dialect information for the backup.

referencingBackups[]

string

Output only. The names of the destination backups being created by copying this source backup. The backup names are of the form projects/<project>/instances/<instance>/backups/<backup>. Referencing backups may exist in different instances. The existence of any referencing backup prevents the backup from being deleted. When the copy operation is done (either successfully completed or cancelled or the destination backup is deleted), the reference to the backup is removed.

maxExpireTime

string (Timestamp format)

Output only. The max allowed expiration time of the backup, with microseconds granularity. A backup's expiration time can be configured in multiple APIs: backups.create, backups.patch, backups.copy. When updating or copying an existing backup, the expiration time specified must be less than Backup.max_expire_time.

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".

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

copy

Starts copying a Cloud Spanner Backup.

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.