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

Modify backup path to add root folder #5245

Closed
wants to merge 2 commits into from
Closed
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
2 changes: 1 addition & 1 deletion pkg/fedvolumebackup/backup/backup_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ func (bm *backupManager) buildBackupMember(volumeBackupName string, clusterMembe
CalcSizeLevel: backupTemplate.CalcSizeLevel,
},
}
backupMember.Spec.S3.Prefix = fmt.Sprintf("%s-%s", backupMember.Spec.S3.Prefix, clusterMember.K8sClusterName)
backupMember.Spec.S3.Prefix = fmt.Sprintf("%s/%s", backupMember.Spec.S3.Prefix, clusterMember.K8sClusterName)
if initialize {
backupMember.Spec.FederalVolumeBackupPhase = pingcapv1alpha1.FederalVolumeBackupInitialize
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func buildBackup(vbs *v1alpha1.VolumeBackupSchedule, timestamp time.Time) *v1alp
}

if backupSpec.Template.S3 != nil {
backupSpec.Template.S3.Prefix = path.Join(backupSpec.Template.S3.Prefix, "-"+timestamp.UTC().Format(pingcapv1alpha1.BackupNameTimeFormat))
backupSpec.Template.S3.Prefix = path.Join(backupSpec.Template.S3.Prefix, timestamp.UTC().Format(pingcapv1alpha1.BackupNameTimeFormat))
} else {
klog.Errorf("Information on S3 missing in template")
return nil
Expand Down
Loading