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

restic diff says 16777215.998 TiB added/removed. #2469

Closed
trrk opened this issue Nov 12, 2019 · 4 comments · Fixed by #2487
Closed

restic diff says 16777215.998 TiB added/removed. #2469

trrk opened this issue Nov 12, 2019 · 4 comments · Fixed by #2487
Labels
category: diff state: need feedback waiting for feedback, e.g. from the submitter type: bug

Comments

@trrk
Copy link

trrk commented Nov 12, 2019

Output of restic version

restic 0.9.5 compiled with go1.12.4 on linux/arm

How did you run restic exactly?

Run on Raspberry Pi 2.

$ ./restic_0.9.5_linux_arm --repo rclone:local:/path/to/repo diff 17b7d2e8 e5566ee1
enter password for repository:
repository bfe93af8 opened successfully, password is correct
comparing snapshot 17b7d2e8 to e5566ee1:

( omit this part... )

Files:         229 new,   229 removed,     0 changed
Dirs:            0 new,     0 removed
Others:          0 new,     0 removed
Data Blobs:   4412 new,  4583 removed
Tree Blobs:     43 new,    43 removed
  Added:   16777215.998 TiB
  Removed: 16777215.998 TiB

What backend/server/service did you use to store the repository?

rclone:local

Expected behavior

Files:         229 new,   229 removed,     0 changed
Dirs:            0 new,     0 removed
Others:          0 new,     0 removed
Data Blobs:   4412 new,  4583 removed
Tree Blobs:     43 new,    43 removed
  Added:   6.204 GiB
  Removed: 6.428 GiB

This output is from the same command run on Windows 7.

Actual behavior

Files:         229 new,   229 removed,     0 changed
Dirs:            0 new,     0 removed
Others:          0 new,     0 removed
Data Blobs:   4412 new,  4583 removed
Tree Blobs:     43 new,    43 removed
  Added:   16777215.998 TiB
  Removed: 16777215.998 TiB

Restic reports wrong added/removed size.

Steps to reproduce the behavior

I think it will be reproduced when run diff between snapshots which added or removed 2 GB or more.

Do you have any idea what may have caused this?

Integer overflow?

Do you have an idea how to solve the issue?

It seems that 16777215.998 TiB had been displayed on the other issue. #1954
I think the cause is the same as it.

Did restic help you or made you happy in any way?

I use restic for backup of music data. I'm happy with taking snapshots and deduplication.

@rawtaz
Copy link
Contributor

rawtaz commented Nov 22, 2019

@trrk Can you possibly see if the PR #2487 fixes the issue? Let me know if you need help checking out and building the code to test it. Thanks a lot!

@rawtaz rawtaz added the state: need feedback waiting for feedback, e.g. from the submitter label Nov 22, 2019
@fd0
Copy link
Member

fd0 commented Nov 22, 2019

Great catch, thanks for the report!

@trrk
Copy link
Author

trrk commented Nov 23, 2019

Thank you for writing the patch. I built it and check whether restic works as expected.

It works great!

$ ./restic version
restic 0.9.6 (v0.9.6-2-g77ef92b9) compiled with go1.13.4 on linux/arm
$ ./restic --repo rclone:local:/path/to/repo diff 17b7d2e8 e5566ee1

....

Files:         229 new,   229 removed,     0 changed
Dirs:            0 new,     0 removed
Others:          0 new,     0 removed
Data Blobs:   4412 new,  4583 removed
Tree Blobs:     43 new,    43 removed
  Added:   6.204 GiB
  Removed: 6.428 GiB

@rawtaz
Copy link
Contributor

rawtaz commented Nov 23, 2019

@trrk Thanks you, appreciate it.

rawtaz added a commit that referenced this issue Nov 23, 2019
diff: Fix wrong bytes reported in diff stats (#2469)
seqizz pushed a commit to seqizz/restic that referenced this issue Jan 22, 2020
seqizz pushed a commit to seqizz/restic that referenced this issue Jan 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: diff state: need feedback waiting for feedback, e.g. from the submitter type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants