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

Support filesystem backup as well as blob store backup #1

Open
wants to merge 1 commit into
base: 1.52.0
Choose a base branch
from

Conversation

mpatou-openai
Copy link
Owner

No description provided.

Copy link

@pme-openai pme-openai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just nits

@@ -253,6 +272,11 @@ func (backup *FoundationDBBackup) BackupURL() string {
return backup.Spec.BlobStoreConfiguration.getURL(backup.BackupName(), backup.Bucket())
}

// mpatou: should we use file:// ?
if backup.Spec.FSConfiguration != nil {
return fmt.Sprintf("%s/%s", backup.Spec.FSConfiguration.URL, backup.BackupName())

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if this is a filesystem path, you should use

Suggested change
return fmt.Sprintf("%s/%s", backup.Spec.FSConfiguration.URL, backup.BackupName())
return path.Join(backup.Spec.FSConfiguration.URL, backup.BackupName())

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation of fdb indicates that you can use file:// I don't think it would work ?

}

// BackupURL gets the destination url of the backup.
func (restore *FoundationDBRestore) BackupURL() string {
if restore.Spec.BlobStoreConfiguration != nil {
return restore.Spec.BlobStoreConfiguration.getURL(restore.BackupName(), restore.Spec.BlobStoreConfiguration.BucketName())
}
if restore.Spec.FSConfiguration != nil {
return fmt.Sprintf("%s/%s", restore.Spec.FSConfiguration.URL, restore.BackupName())

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if this is a filesystem path, you should use

Suggested change
return fmt.Sprintf("%s/%s", restore.Spec.FSConfiguration.URL, restore.BackupName())
return path.Join(restore.Spec.FSConfiguration.URL, restore.BackupName())

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above ?

}
// mpatou: should we use file:// ?
if backup.Spec.FSConfiguration != nil {
return fmt.Sprintf("%s/%s", backup.Spec.FSConfiguration.URL, backup.BackupName())

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if this is a filesystem path, you should use

Suggested change
return fmt.Sprintf("%s/%s", backup.Spec.FSConfiguration.URL, backup.BackupName())
return path.Join(backup.Spec.FSConfiguration.URL, backup.BackupName())

}

if restore.Spec.FSConfiguration != nil {
return fmt.Sprintf("%s/%s", restore.Spec.FSConfiguration.URL, restore.BackupName())

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as previous

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants