garethgeorge / backrest

Backrest is a web UI and orchestrator for restic backup.
GNU General Public License v3.0
1.73k stars 50 forks source link

Backrest representation of sizes reported by restic may be misleading #433

Closed digicommons closed 3 months ago

digicommons commented 3 months ago

Describe the bug Restic outputs sizes in units based on powers of 2 (e.g. KiB, MiB, GiB etc.). Backrest on the other hand seems to report these exact values with the unit symbol for units based on powers of 10 (e.g. KB, MB, GB etc.)

To Reproduce

  1. View past or running backups on plan page as well as detail component of a running backup.
  2. Compare reported size to size of remote (e.g. 2.33 TB on Backrest vs. 2545 GB on Backblaze)

Expected behavior Backrest should either display the unit symbols that restic uses (KiB, MiB, GiB etc.) or convert the values that restic provides to units based on powers of 10 and use the corresponding unit symbols (KB, MB, GB).

Screenshots

image

Platform Info

Additional context Default restic output of backup sizes (source), note the unit symbols:

scan finished in 1.837s: 5307 files, 1.720 GiB

Files:        5307 new,     0 changed,     0 unmodified
Dirs:         1867 new,     0 changed,     0 unmodified
Added to the repository: 1.200 GiB (1.103 GiB stored)

processed 5307 files, 1.720 GiB in 0:12
garethgeorge commented 3 months ago

Fixed in https://github.com/garethgeorge/backrest/commit/cc173aa7b1b9dda10cfb14ca179c9701d15f22f5

digicommons commented 3 months ago

Thank you for fixing it this swiftly!