Modify backup path to add root folder #5245
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
currently ebs backup for multi az cluster will create backup path
s3://{bucket_name}/prefix-k8s-cluster. so backups for each k8s cluster don't have a root folder.
for volumebackupschedule, we saw external storage backup path folder name starting with hyphen
shared-iam/sched1/-2023-08-10t23-10-00-m-tidb-test-d-ea1-us/
shared-iam/sched1/-2023-08-10t23-10-00-m-tidb-test-e-ea1-us/
shared-iam/sched1/-2023-08-10t23-10-00-m-tidb-test-f-ea1-us/
What is changed and how does it work?
Code changes
Adding a new level of folder in backup path.
e.g.
volumeBackup vb1 creates folder
s3://{bucket_name}/{backup_namespace}/vb1-k8s-cluster1,
s3://{bucket_name}/{backup_namespace}/vb1-k8s-cluster2 and
s3://{bucket_name}/{backup_namespace}/vb1-k8s-cluster3.
backup path after this change will be like
s3://{bucket_name}/{backup_namespace}/vb1/k8s-cluster1,
s3://{bucket_name}/{backup_namespace}/vb1/k8s-cluster2,
s3://{bucket_name}/{backup_namespace}/vb1/k8s-cluster3
for volumebackupschedule, this code change will remove the hyphen
Tests
Side effects
Related changes
Release Notes
Please refer to Release Notes Language Style Guide before writing the release note.
Reviewers: @WangLe1321 @BornChanger