Skip to content

Commit

Permalink
PMM-8430 Add retention to backup scheduling (#764)
Browse files Browse the repository at this point in the history
* PMM-8430 Add retention to backup scheduling

* PMM-8430 Infinity ->unlimited
  • Loading branch information
Dasio authored Jul 30, 2021
1 parent 685e1d7 commit 154612d
Show file tree
Hide file tree
Showing 8 changed files with 243 additions and 150 deletions.
337 changes: 187 additions & 150 deletions api/managementpb/backup/backups.pb.go

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions api/managementpb/backup/backups.proto
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ message ScheduledBackup {
google.protobuf.Timestamp last_run = 16;
// Next run.
google.protobuf.Timestamp next_run = 17;
// How many artifacts keep. 0 - unlimited.
uint32 retention = 18;
}

message ScheduleBackupRequest {
Expand Down Expand Up @@ -130,6 +132,8 @@ message ScheduleBackupRequest {
//uint32 retry_times = 8;
// If scheduling is enabled.
bool enabled = 9;
// How many artifacts keep. 0 - unlimited.
uint32 retention = 10;
}

message ScheduleBackupResponse {
Expand Down Expand Up @@ -162,6 +166,8 @@ message ChangeScheduledBackupRequest {
// How many times to retry a failed backup before giving up.
//google.protobuf.UInt32Value retry_times = 8;

// How many artifacts keep. 0 - unlimited.
google.protobuf.UInt32Value retention = 9;
}

message ChangeScheduledBackupResponse {}
Expand Down
5 changes: 5 additions & 0 deletions api/managementpb/backup/backups.validator.pb.go

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

18 changes: 18 additions & 0 deletions api/managementpb/backup/json/backup.json
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,12 @@
"type": "string",
"x-order": 4
},
"retention": {
"description": "How many artifacts keep. 0 - unlimited.",
"type": "integer",
"format": "int64",
"x-order": 6
},
"scheduled_backup_id": {
"type": "string",
"x-order": 0
Expand Down Expand Up @@ -418,6 +424,12 @@
"format": "date-time",
"x-order": 13
},
"retention": {
"description": "How many artifacts keep. 0 - unlimited.",
"type": "integer",
"format": "int64",
"x-order": 14
},
"scheduled_backup_id": {
"description": "Machine-readable ID.",
"type": "string",
Expand Down Expand Up @@ -690,6 +702,12 @@
"type": "string",
"x-order": 4
},
"retention": {
"description": "How many artifacts keep. 0 - unlimited.",
"type": "integer",
"format": "int64",
"x-order": 7
},
"service_id": {
"description": "Service identifier where backup should be performed.",
"type": "string",
Expand Down

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

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

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

18 changes: 18 additions & 0 deletions api/swagger/swagger-dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -24923,6 +24923,12 @@
"description": "Human-readable description.",
"type": "string",
"x-order": 5
},
"retention": {
"description": "How many artifacts keep. 0 - unlimited.",
"type": "integer",
"format": "int64",
"x-order": 6
}
}
}
Expand Down Expand Up @@ -25084,6 +25090,12 @@
"type": "string",
"format": "date-time",
"x-order": 13
},
"retention": {
"description": "How many artifacts keep. 0 - unlimited.",
"type": "integer",
"format": "int64",
"x-order": 14
}
}
},
Expand Down Expand Up @@ -25341,6 +25353,12 @@
"description": "Delay between each retry. Should have a suffix in JSON: 1s, 1m, 1h.\ngoogle.protobuf.Duration retry_interval = 7;\nHow many times to retry a failed backup before giving up.\nuint32 retry_times = 8;\nIf scheduling is enabled.",
"type": "boolean",
"x-order": 6
},
"retention": {
"description": "How many artifacts keep. 0 - unlimited.",
"type": "integer",
"format": "int64",
"x-order": 7
}
}
}
Expand Down

0 comments on commit 154612d

Please sign in to comment.