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

🚧 [Hosts] Backup Settings #37778

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

davidegiacometti
Copy link
Collaborator

@davidegiacometti davidegiacometti commented Mar 5, 2025

Summary of the Pull Request

PR Checklist

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

@davidegiacometti davidegiacometti marked this pull request as draft March 5, 2025 22:18
@htcfreek
Copy link
Collaborator

htcfreek commented Mar 6, 2025

I suggest as we have the on/of checkbox for cleanup to set the number boxes to min=1.

@davidegiacometti
Copy link
Collaborator Author

I suggest as we have the on/of checkbox for cleanup to set the number boxes to min=1.

The idea is that user can configure retention by:

  • Days only: Days = N - Backups = 0
  • Backups only: Days = 0 - Backups = N
  • Both: Days = N - Backups = N

In case both are set to 0 the warning is displayed and no backups are deleted.

Do you think this makes sense?

Copy link
Collaborator

@htcfreek htcfreek left a comment

Choose a reason for hiding this comment

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

some ui nits

@htcfreek
Copy link
Collaborator

htcfreek commented Mar 6, 2025

I suggest as we have the on/of checkbox for cleanup to set the number boxes to min=1.

The idea is that user can configure retention by:

  • Days only: Days = N - Backups = 0
  • Backups only: Days = 0 - Backups = N
  • Both: Days = N - Backups = N

In case both are set to 0 the warning is displayed and no backups are deleted.

Do you think this makes sense?

These all feels to complicated. I think keep it simple is the way to go.

And simple for me is:

  • Backups are enabled or not.
  • Automatic cleanup is "disable" or "based on age" or "based on number". (Can be a drop down.)
  • Based on the cleanup type I can configure nothing or the days or the number.

@davidegiacometti
Copy link
Collaborator Author

These all feels to complicated. I think keep it simple is the way to go.

And simple for me is:

  • Backups are enabled or not.
  • Automatic cleanup is "disable" or "based on age" or "based on number". (Can be a drop down.)
  • Based on the cleanup type I can configure nothing or the days or the number.

I started with this idea, but #37666 (comment) made me change it.

Safer would be to keep at least the most recent backup (no matter how old) and then delete others older than 15 days?

But I am happy to have a feedback on this.

@htcfreek
Copy link
Collaborator

htcfreek commented Mar 6, 2025

Safer would be to keep at least the most recent backup (no matter how old) and then delete others older than 15 days?\n\nBut I am happy to have a feedback on this.

Okay. But then lets allow the following logic: Remove backups older x days (x = setting >= 1) and hard coded keep always 1 backup.

The if-else-else solution is to complicated.

We can add a description to cleanup checkbox that at least one backup is always kept regardless of its age.

@davidegiacometti
Copy link
Collaborator Author

davidegiacometti commented Mar 6, 2025

I need to think about this: the idea around the PR is to remove any hardcoded/hidden logic related to backups.
What do you find confusing of the proposed logic? The warning message?

@htcfreek
Copy link
Collaborator

htcfreek commented Mar 6, 2025

I need to think about this: the idea around the PR is to remove any hardcoded/hidden logic related to backups.
What do you find confusing of the proposed logic? The warning message?

The point that we have multiple ways of doing it which influence each other. And that you can configure it to not clean up even that zhe clean up is enabled.

@davidegiacometti
Copy link
Collaborator Author

Animation

@htcfreek any thoughts on this UX?

  • No warning
  • User can set only Days or Copies to 0
  • When Days and Copies are set to 0, "Automatically delete old backups" is disabled and Days and Copies are set to their default

@htcfreek
Copy link
Collaborator

htcfreek commented Mar 8, 2025

Animation

@htcfreek any thoughts on this UX?

  • No warning
  • User can set only Days or Copies to 0
  • When Days and Copies are set to 0, "Automatically delete old backups" is disabled and Days and Copies are set to their default

@davidegiacometti
Much better.

With zero as date or time all backups will be deleted on the next ????. We should add description to explain that. May on the cleanup check box something like "Clean up is executed on the ....".

@davidegiacometti
Copy link
Collaborator Author

The backups cleanup is always executed on editor startup. These options are used to determine for how many days backups are kept or/and how many fixed backups are kept.

@htcfreek
Copy link
Collaborator

htcfreek commented Mar 8, 2025

The backups cleanup is always executed on editor startup. These options are used to determine for how many days backups are kept or/and how many fixed backups are kept.

Yes. What I mean is: It makes a difference with 0 days if I start Hosts multiple times per day or not.

And for me keeping 0 days means deleting at the day of creating and not keeping indefinitely. That is confusing.

@davidegiacometti
Copy link
Collaborator Author

Yes. What I mean is: It makes a difference with 0 days if I start Hosts multiple times per day or not.

0 days means only the number of backups is considered.

And for me keeping 0 days means deleting at the day of creating and not keeping indefinitely. That is confusing.

image

You mean that this may be confused as Keep for infinite days AND Keep 10 backups... I see...

TBH I am thinking about reconsider the following solution even if user is forced to choose between number of days or number or backups.

  • Backups are enabled or not.
  • Automatic cleanup is "disable" or "based on age" or "based on number". (Can be a drop down.)
  • Based on the cleanup type I can configure nothing or the days or the number.

@htcfreek
Copy link
Collaborator

htcfreek commented Mar 8, 2025

Yes. What I mean is: It makes a difference with 0 days if I start Hosts multiple times per day or not.

0 days means only the number of backups is considered.

And for me keeping 0 days means deleting at the day of creating and not keeping indefinitely. That is confusing.

image

You mean that this may be confused as Keep for infinite days AND Keep 10 backups... I see...

No. As keeping 0 backups for 10 days which means no backups kept.

To make the current UI logically we need drop downs instead of number boxes:

  • Keep backups: All, 1, 2, 3, 5, 10, 15, 30, 50, 75, 100
  • Kepp days: Indefinit, 1, 2, 3, 5, 10, 15, 30, 60, 90, 180

TBH I am thinking about reconsider the following solution even if user is forced to choose between number of days or number or backups.

  • Backups are enabled or not.
  • Automatic cleanup is "disable" or "based on age" or "based on number". (Can be a drop down.)
  • Based on the cleanup type I can configure nothing or the days or the number.

Would be the easiest implementation.

@davidegiacometti
Copy link
Collaborator Author

I think the drop downs are limiting.. 🤔
I’m going to close this PR for now and try to create a new one with a better approach in the future.
In any case, it is not a priority but rather an enhancement.

@davidegiacometti
Copy link
Collaborator Author

davidegiacometti commented Mar 8, 2025

Hey @htcfreek

Can I have a feedback on these mocks?
Every NumberBox has Minimum set to 1, except for Based on age | Number of backups to keep that is optional and has a Minimum of 0.

image 420622303-349f7a33-355b-4665-b5fe-2abdadb7ccfa 420622309-c4571bca-3dd7-40ab-85bd-a9205c3d0948

Let me know if you think this solution is clear. If your answer is positive I am going to reopen this PR and tweak the implementation.

@htcfreek
Copy link
Collaborator

htcfreek commented Mar 8, 2025

@davidegiacometti

Two suggestions:

  • Replace Number with Count in the drop down.
  • For the combined type use Based on age and count in the drop down.

Every NumberBox has Minimum set to 1, except for Based on age | Number of backups to keep that is optional and has a Minimum of 0.

Can't follow you. There are only these two number boxes in the screenshots. Are there any screenshots missing?

And I still see see the problem that 0 means nothing. So we should explain the meaning of 0 in the number box description.

@davidegiacometti
Copy link
Collaborator Author

Ok for the suggestions.

Please see the update screenshot.
TBH I don't understand what's the problem of 0: see the last NumberBox description.

@htcfreek
Copy link
Collaborator

htcfreek commented Mar 8, 2025

TBH I don't understand what's the problem of 0: see the last NumberBox description.

Sory. My mistake. Was confused after all the solutions we discussed.

@htcfreek
Copy link
Collaborator

htcfreek commented Mar 8, 2025

Let me know if you think this solution is clear. If your answer is positive I am going to reopen this PR and tweak the implementation.

Yes. It is clear. Let's implement that solution.

@davidegiacometti
Copy link
Collaborator Author

Thanks for the feedback.. And I like this solution!
Reopening the PR.

<value>Days</value>
</data>
<data name="Hosts_Backup_CountBased_CountInput.Header" xml:space="preserve">
<value>Backups count</value>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Isn't the correct grammar "Backup count"?

Comment on lines +4944 to 4946
<data name="Hosts_Backup_AgeCountBased_CountInput.Header" xml:space="preserve">
<value>Backups count</value>
</data>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Duplicate. Do we really need this twice?

Comment on lines +4926 to +4930
<data name="Hosts_Backup_CountBased_CountInput.Description" xml:space="preserve">
<value>Set the number of backups to retain, deleting older ones once the limit is reached</value>
</data>
<data name="Hosts_Backup_AgeCountBased_DaysInput.Description" xml:space="preserve">
<value>Set the number of days to retain backups, deleting older ones once the limit is reached</value>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we have two independent sentences instead of using a comma? Would be easier to understand.

For me "keep" sounds better than "retain".

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