Skip to content

Commit 4b64cb4

Browse files
Google APIscopybara-github
authored andcommitted
feat: Add support for AlloyDB backup and restore
docs: A comment for field `log_retention_days` in message `.google.cloud.backupdr.v1.BackupPlan` is changed PiperOrigin-RevId: 862089230
1 parent cfe62b3 commit 4b64cb4

File tree

4 files changed

+75
-1
lines changed

4 files changed

+75
-1
lines changed

google/cloud/backupdr/v1/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ proto_library(
2828
"backupplan.proto",
2929
"backupplanassociation.proto",
3030
"backupvault.proto",
31+
"backupvault_alloydb.proto",
3132
"backupvault_ba.proto",
3233
"backupvault_cloudsql.proto",
3334
"backupvault_disk.proto",

google/cloud/backupdr/v1/backupplan.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ message BackupPlan {
127127
string backup_vault_service_account = 11
128128
[(google.api.field_behavior) = OUTPUT_ONLY];
129129

130-
// Optional. Applicable only for CloudSQL resource_type.
130+
// Optional. Applicable only for CloudSQL and AlloyDB resource_type.
131131
//
132132
// Configures how long logs will be stored. It is defined in “days”. This
133133
// value should be greater than or equal to minimum enforced log retention

google/cloud/backupdr/v1/backupvault.proto

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package google.cloud.backupdr.v1;
1919
import "google/api/field_behavior.proto";
2020
import "google/api/field_info.proto";
2121
import "google/api/resource.proto";
22+
import "google/cloud/backupdr/v1/backupvault_alloydb.proto";
2223
import "google/cloud/backupdr/v1/backupvault_ba.proto";
2324
import "google/cloud/backupdr/v1/backupvault_cloudsql.proto";
2425
import "google/cloud/backupdr/v1/backupvault_disk.proto";
@@ -436,6 +437,11 @@ message DataSourceGcpResource {
436437
cloud_sql_instance_datasource_properties = 5
437438
[(google.api.field_behavior) = OUTPUT_ONLY];
438439

440+
// Output only. AlloyDBClusterDataSourceProperties has a subset of AlloyDB
441+
// cluster properties that are useful at the Datasource level.
442+
AlloyDBClusterDataSourceProperties alloy_db_cluster_datasource_properties =
443+
6 [(google.api.field_behavior) = OUTPUT_ONLY];
444+
439445
// DiskDataSourceProperties has a subset of Disk properties that are useful
440446
// at the Datasource level.
441447
DiskDataSourceProperties disk_datasource_properties = 7;
@@ -667,6 +673,10 @@ message Backup {
667673
BackupApplianceBackupProperties backup_appliance_backup_properties = 21
668674
[(google.api.field_behavior) = OUTPUT_ONLY];
669675

676+
// Output only. AlloyDB specific backup properties.
677+
AlloyDbClusterBackupProperties alloy_db_backup_properties = 27
678+
[(google.api.field_behavior) = OUTPUT_ONLY];
679+
670680
// Output only. Disk specific backup properties.
671681
DiskBackupProperties disk_backup_properties = 28
672682
[(google.api.field_behavior) = OUTPUT_ONLY];
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
// Copyright 2025 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
syntax = "proto3";
16+
17+
package google.cloud.backupdr.v1;
18+
19+
import "google/api/field_behavior.proto";
20+
import "google/api/resource.proto";
21+
22+
option csharp_namespace = "Google.Cloud.BackupDR.V1";
23+
option go_package = "cloud.google.com/go/backupdr/apiv1/backupdrpb;backupdrpb";
24+
option java_multiple_files = true;
25+
option java_outer_classname = "BackupvaultAlloyDBProto";
26+
option java_package = "com.google.cloud.backupdr.v1";
27+
option php_namespace = "Google\\Cloud\\BackupDR\\V1";
28+
option ruby_package = "Google::Cloud::BackupDR::V1";
29+
option (google.api.resource_definition) = {
30+
type: "alloydb.googleapis.com/Cluster"
31+
pattern: "projects/{project}/locations/{location}/clusters/{cluster}"
32+
};
33+
34+
// AlloyDBClusterDataSourceProperties represents the properties of a
35+
// AlloyDB cluster resource that are stored in the DataSource.
36+
// .
37+
message AlloyDBClusterDataSourceProperties {
38+
// Output only. Name of the AlloyDB cluster backed up by the datasource.
39+
string name = 1 [
40+
(google.api.field_behavior) = OUTPUT_ONLY,
41+
(google.api.resource_reference) = { type: "alloydb.googleapis.com/Cluster" }
42+
];
43+
}
44+
45+
// AlloyDbClusterBackupProperties represents AlloyDB cluster
46+
// backup properties.
47+
// .
48+
message AlloyDbClusterBackupProperties {
49+
// An optional text description for the backup.
50+
optional string description = 1;
51+
52+
// Output only. Storage usage of this particular backup
53+
int64 stored_bytes = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
54+
55+
// Output only. The chain id of this backup. Backups belonging to the same
56+
// chain are sharing the same chain id. This property is calculated and
57+
// maintained by BackupDR.
58+
string chain_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
59+
60+
// Output only. The PostgreSQL major version of the AlloyDB cluster when the
61+
// backup was taken.
62+
string database_version = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
63+
}

0 commit comments

Comments
 (0)