Skip to content

Commit 33b9645

Browse files
feat(spanner): Add support for Cloud Spanner Incremental Backups (#2085)
* feat(spanner): Add support for Cloud Spanner Incremental Backups PiperOrigin-RevId: 657612329 Source-Link: googleapis/googleapis@e77b669 Source-Link: googleapis/googleapis-gen@0f66346 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMGY2NjM0NjlmM2VkY2MzNGM2MGMxYmJlMDE3MjdjYzVlYjk3MWM2MCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: danieljbruce <danieljbruce@users.noreply.github.com>
1 parent 4ec1561 commit 33b9645

File tree

5 files changed

+542
-4
lines changed

5 files changed

+542
-4
lines changed

protos/google/spanner/admin/database/v1/backup.proto

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,24 @@ message Backup {
103103
// Output only. Size of the backup in bytes.
104104
int64 size_bytes = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
105105

106+
// Output only. The number of bytes that will be freed by deleting this
107+
// backup. This value will be zero if, for example, this backup is part of an
108+
// incremental backup chain and younger backups in the chain require that we
109+
// keep its data. For backups not in an incremental backup chain, this is
110+
// always the size of the backup. This value may change if backups on the same
111+
// chain get created, deleted or expired.
112+
int64 freeable_size_bytes = 15 [(google.api.field_behavior) = OUTPUT_ONLY];
113+
114+
// Output only. For a backup in an incremental backup chain, this is the
115+
// storage space needed to keep the data that has changed since the previous
116+
// backup. For all other backups, this is always the size of the backup. This
117+
// value may change if backups on the same chain get deleted or expired.
118+
//
119+
// This field can be used to calculate the total storage space used by a set
120+
// of backups. For example, the total space used by all backups of a database
121+
// can be computed by summing up this field.
122+
int64 exclusive_size_bytes = 16 [(google.api.field_behavior) = OUTPUT_ONLY];
123+
106124
// Output only. The current state of the backup.
107125
State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
108126

@@ -168,6 +186,23 @@ message Backup {
168186
// single backup schedule URI associated with creating this backup.
169187
repeated string backup_schedules = 14
170188
[(google.api.field_behavior) = OUTPUT_ONLY];
189+
190+
// Output only. Populated only for backups in an incremental backup chain.
191+
// Backups share the same chain id if and only if they belong to the same
192+
// incremental backup chain. Use this field to determine which backups are
193+
// part of the same incremental backup chain. The ordering of backups in the
194+
// chain can be determined by ordering the backup `version_time`.
195+
string incremental_backup_chain_id = 17
196+
[(google.api.field_behavior) = OUTPUT_ONLY];
197+
198+
// Output only. Data deleted at a time older than this is guaranteed not to be
199+
// retained in order to support this backup. For a backup in an incremental
200+
// backup chain, this is the version time of the oldest backup that exists or
201+
// ever existed in the chain. For all other backups, this is the version time
202+
// of the backup. This field can be used to understand what data is being
203+
// retained by the backup system.
204+
google.protobuf.Timestamp oldest_version_time = 18
205+
[(google.api.field_behavior) = OUTPUT_ONLY];
171206
}
172207

173208
// The request for
@@ -705,3 +740,11 @@ message CopyBackupEncryptionConfig {
705740
// A full backup stores the entire contents of the database at a given
706741
// version time.
707742
message FullBackupSpec {}
743+
744+
// The specification for incremental backup chains.
745+
// An incremental backup stores the delta of changes between a previous
746+
// backup and the database contents at a given version time. An
747+
// incremental backup chain consists of a full backup and zero or more
748+
// successive incremental backups. The first backup created for an
749+
// incremental backup chain is always a full backup.
750+
message IncrementalBackupSpec {}

protos/google/spanner/admin/database/v1/backup_schedule.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ message BackupSchedule {
8383
oneof backup_type_spec {
8484
// The schedule creates only full backups.
8585
FullBackupSpec full_backup_spec = 7;
86+
87+
// The schedule creates incremental backup chains.
88+
IncrementalBackupSpec incremental_backup_spec = 8;
8689
}
8790

8891
// Output only. The timestamp at which the schedule was last updated.

protos/protos.d.ts

Lines changed: 122 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)