-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: 1.52.0
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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()) |
There was a problem hiding this comment.
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
return fmt.Sprintf("%s/%s", backup.Spec.FSConfiguration.URL, backup.BackupName()) | |
return path.Join(backup.Spec.FSConfiguration.URL, backup.BackupName()) |
There was a problem hiding this comment.
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()) |
There was a problem hiding this comment.
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
return fmt.Sprintf("%s/%s", restore.Spec.FSConfiguration.URL, restore.BackupName()) | |
return path.Join(restore.Spec.FSConfiguration.URL, restore.BackupName()) |
There was a problem hiding this comment.
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()) |
There was a problem hiding this comment.
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
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()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as previous
No description provided.