Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(spanner): Add support for Cloud Spanner Incremental Backups #2085

Merged
merged 3 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions protos/google/spanner/admin/database/v1/backup.proto
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,24 @@ message Backup {
// Output only. Size of the backup in bytes.
int64 size_bytes = 5 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The number of bytes that will be freed by deleting this
// backup. This value will be zero if, for example, this backup is part of an
// incremental backup chain and younger backups in the chain require that we
// keep its data. For backups not in an incremental backup chain, this is
// always the size of the backup. This value may change if backups on the same
// chain get created, deleted or expired.
int64 freeable_size_bytes = 15 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. For a backup in an incremental backup chain, this is the
// storage space needed to keep the data that has changed since the previous
// backup. For all other backups, this is always the size of the backup. This
// value may change if backups on the same chain get deleted or expired.
//
// This field can be used to calculate the total storage space used by a set
// of backups. For example, the total space used by all backups of a database
// can be computed by summing up this field.
int64 exclusive_size_bytes = 16 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The current state of the backup.
State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY];

Expand Down Expand Up @@ -168,6 +186,23 @@ message Backup {
// single backup schedule URI associated with creating this backup.
repeated string backup_schedules = 14
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Populated only for backups in an incremental backup chain.
// Backups share the same chain id if and only if they belong to the same
// incremental backup chain. Use this field to determine which backups are
// part of the same incremental backup chain. The ordering of backups in the
// chain can be determined by ordering the backup `version_time`.
string incremental_backup_chain_id = 17
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Data deleted at a time older than this is guaranteed not to be
// retained in order to support this backup. For a backup in an incremental
// backup chain, this is the version time of the oldest backup that exists or
// ever existed in the chain. For all other backups, this is the version time
// of the backup. This field can be used to understand what data is being
// retained by the backup system.
google.protobuf.Timestamp oldest_version_time = 18
[(google.api.field_behavior) = OUTPUT_ONLY];
}

// The request for
Expand Down Expand Up @@ -705,3 +740,11 @@ message CopyBackupEncryptionConfig {
// A full backup stores the entire contents of the database at a given
// version time.
message FullBackupSpec {}

// The specification for incremental backup chains.
// An incremental backup stores the delta of changes between a previous
// backup and the database contents at a given version time. An
// incremental backup chain consists of a full backup and zero or more
// successive incremental backups. The first backup created for an
// incremental backup chain is always a full backup.
message IncrementalBackupSpec {}
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ message BackupSchedule {
oneof backup_type_spec {
// The schedule creates only full backups.
FullBackupSpec full_backup_spec = 7;

// The schedule creates incremental backup chains.
IncrementalBackupSpec incremental_backup_spec = 8;
}

// Output only. The timestamp at which the schedule was last updated.
Expand Down
123 changes: 122 additions & 1 deletion protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading