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

Add an option to display the size of a snapshot #3662

Closed
TLINDEN opened this issue Mar 5, 2022 · 7 comments
Closed

Add an option to display the size of a snapshot #3662

TLINDEN opened this issue Mar 5, 2022 · 7 comments
Labels
category: documentation help: good first issue easy issue to get started with for beginners (both Go and restic) help: minor complexity less complex issue, good for beginners that want a little challenge yet not too complicated help: wanted

Comments

@TLINDEN
Copy link

TLINDEN commented Mar 5, 2022

Output of restic version

restic 0.12.1 compiled with go1.17.5 on freebsd/amd64

What should restic do differently? Which functionality do you think we should add?

restic snapshots shall display the size of a snapshot (i.e. disk usage), or when a special option like --display-size has been supplied.

What are you trying to do? What problem would this solve?

I am using an external SFTP server as storage backend, which has a limited volume size. I am able to grow it but this adds cost. Currently I only see how much disk space ALL snapshots of ALL hosts are using. However, it may happen that the backup suddenly eats much more backend space than before. In such a case I want to be able to find out which snapshot it was so I can inspect the machine where it came from - AND/OR tune the backend storage size accordingly (before I get errors from restic because the disk is full).

Did restic help you today? Did it make you happy in any way?

Restic helps me a lot, every day! A couple of weeks ago my primary server had a boot slice error and I needed to re-install it. During the process I realized that my backups were incomplete and so I lost data from a half year. Now all my systems use restic and I am more than happy! I already accidently deleted a webserver docroot and could restore it using restic in a couple of minutes. A dream :) !

@MichaelEischer
Copy link
Member

I'm not entirely sure what you're asking for. It sounds like the simplest solution would be to check the summary returned by backup --verbose for sudden increases in uploaded data size.

Another option would be to compare the non-deduplicated data size, which would be #693.

Or the question is how much data deleting a snapshot would free, and that is not easy to calculate due to deduplication. But with recent restic versions forget --prune --dry-run <snapshot> would do just that.

The diff command also prints how much data only belongs to one or both of the compared snapshots.

@MichaelEischer MichaelEischer added the state: need feedback waiting for feedback, e.g. from the submitter label Mar 5, 2022
@TLINDEN
Copy link
Author

TLINDEN commented Mar 6, 2022

Hello Michael.

I tried the forget --prune --dry-run command, it does the job. I also added the --verbose option to backup. So, from my point of view I am happy.

Thanks a lot!!!

@MichaelEischer MichaelEischer added help: wanted category: documentation help: minor complexity less complex issue, good for beginners that want a little challenge yet not too complicated help: good first issue easy issue to get started with for beginners (both Go and restic) and removed state: need feedback waiting for feedback, e.g. from the submitter labels Apr 3, 2022
@MichaelEischer
Copy link
Member

I guess we should document this somewhere, I had the same question some time ago and didn't immediately think of using forget --dry-run --prune. Anyone up for a PR?

@tribor
Copy link

tribor commented Apr 19, 2022

nevertheless, it would be helpful to have a option to restic snapshots (like the mentioned --display-size) to see metrics like

  • size of data locally
  • size of repo data
  • size of data added to repo

for each snapshot. By presenting these metrics you can easily estimate how the repo growth looks like or where deviations/irregularities have occurred.

@MichaelEischer
Copy link
Member

@tribor The discussion for that feature belongs into #693.

@huyz
Copy link

huyz commented Apr 22, 2024

I guess this should be closed now that #693 has been closed?

@MichaelEischer
Copy link
Member

I think so. The snapshot now contains the size of the backed up files as well as the byte uploaded for that specific snapshot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: documentation help: good first issue easy issue to get started with for beginners (both Go and restic) help: minor complexity less complex issue, good for beginners that want a little challenge yet not too complicated help: wanted
Projects
None yet
Development

No branches or pull requests

4 participants