feat(pitr): add command to restore a database to a specific point in time - #1244
feat(pitr): add command to restore a database to a specific point in time#1244matthieu526-scalingo wants to merge 5 commits into
Conversation
curzolapierre
left a comment
There was a problem hiding this comment.
Just a question otherwise LGTM
| return errors.Wrapf(ctx, err, "get Scalingo client") | ||
| } | ||
|
|
||
| operationID, err := c.DatabasePITRRestore(ctx, currentResource, addonName, restoreTime) |
There was a problem hiding this comment.
Suggestion: what about adding a confirmation message to the end user?
Which would format the date as human readable (maybe add the local time conversion).
There was a problem hiding this comment.
What do you mean? There is a io.Status 2 lines below. Or do you mean improving said message?
There was a problem hiding this comment.
Praise thanks for this update
| return errors.Wrap(ctx, err, "restore database") | ||
| } | ||
|
|
||
| io.Statusf("Database restore operation %s has been created", operationID) |
There was a problem hiding this comment.
question: what does the output looks like?
There was a problem hiding this comment.
I am not sure what you mean? It will just display a line with that info, like we do on many other commands (eg project creation)
There was a problem hiding this comment.
I am asking because there is no "\n" at the end. Usually I would expect a newline at the end
There was a problem hiding this comment.
Oooooh. I see what you mean, nice catch 🙇 . I guess the example I used was wrong.
I haven't QAed yet (as stated in the description)
Add a new command to restore PITR.
It reuses the same mechanism as maintenance. Both components are shared between SR addons and DR databases.
It adds a small check to ensure the time is correctly parsed.