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

[DPE-6052] Allow --restore-to-time=latest without a backup-id #787

Merged
merged 4 commits into from
Nov 26, 2024

Conversation

marceloneppel
Copy link
Member

@marceloneppel marceloneppel commented Nov 25, 2024

Issue

When trying to restore to the latest time from a repository, the charm complains that a backup ID is required.

Solution

Allow users to restore without a backup ID (with only the --restore-to-time=latest parameter).

Also, add a new check that prevents the PITR and warns the user that there is no base backup in the latest timeline if there isn't one. Previously, if the user tried to restore from that timeline, the restore would be reported as successful, but in fact, it didn't happen.

Signed-off-by: Marcelo Henrique Neppel <[email protected]>
Signed-off-by: Marcelo Henrique Neppel <[email protected]>
Copy link

codecov bot commented Nov 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.53%. Comparing base (fdf66d4) to head (4a69a1b).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #787      +/-   ##
==========================================
+ Coverage   75.46%   75.53%   +0.07%     
==========================================
  Files          12       12              
  Lines        3118     3127       +9     
  Branches      476      478       +2     
==========================================
+ Hits         2353     2362       +9     
  Misses        622      622              
  Partials      143      143              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@marceloneppel marceloneppel changed the title [DPE-6052] Fix restore-to-time=latest [DPE-6052] Allow --restore-to-time=latest without a backup-id Nov 25, 2024
@marceloneppel marceloneppel marked this pull request as ready for review November 25, 2024 21:02
Signed-off-by: Marcelo Henrique Neppel <[email protected]>
Copy link
Contributor

@taurus-forever taurus-forever left a comment

Choose a reason for hiding this comment

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

Thank you for the fast fix!

@marceloneppel marceloneppel merged commit 1a33052 into main Nov 26, 2024
111 checks passed
@marceloneppel marceloneppel deleted the dpe-6052-fix-restore-to-time-latest branch November 26, 2024 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants