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

Possible to shedule "Compute stats" #646

Open
ecker00 opened this issue Jan 18, 2025 · 3 comments
Open

Possible to shedule "Compute stats" #646

ecker00 opened this issue Jan 18, 2025 · 3 comments
Labels
enhancement New feature or request

Comments

@ecker00
Copy link

ecker00 commented Jan 18, 2025

It is mentioned briefly in #536.

It feels like in the Repo settings page "Stats policy" is missing, like prune and check currently does. Seems natural to generate these stats on a daily basis for most users, making the "Stats" tab more useful when it has consistent data to display.

Image

@ecker00 ecker00 added the enhancement New feature or request label Jan 18, 2025
@garethgeorge
Copy link
Owner

Hmm, I'm a bit opinionated that stats shouldn't be scheduled other than after a prune operation runs (which is how it's done today).

This is because after a prune is the only time that a repo's size can be expected to be somewhat consistent. Restic will have just dropped extraneous data from the repo etc. Otherwise you should expect to see a fairly spiky chart depending on how much churn there is in your dataset. The second concern is that stats operations are surprisingly expensive: they do a full traversal of the repo's index.

Open to other opinions, but I don't see a very good use case for scheduled stats separately from prune.

@ecker00
Copy link
Author

ecker00 commented Jan 25, 2025

Ah, I was not aware that was the case. As I had scheduled prune to only run once a week, so my new setup looked like it did not calculate stats first few days.

New suggestion: Include some info that it works what way, for example

Image

<div class="ant-col ant-col-4 ant-form-item-label css-18cha1o">
  <label class="" title="">
    <span>Prune Policy</span>
  </label>
  <br />
  <span style="color: #999; font-size: 0.9em">
    (Also computes stats)
  </span>
</div>

@sumnerboy12
Copy link

In my scenario I only use Backrest as a UI/view on top of a series of restic repos I manage externally. All backups, forgetting and pruning is done outside of Backrest. But it would be nice to view the repo stats in Backrest, so I personally would be keen for a periodic "Compute Stats Policy" or the like.

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

No branches or pull requests

3 participants