g3492 / vzborg

Simple deduplicated encrypted backups for Proxmox
GNU Affero General Public License v3.0
55 stars 15 forks source link

Added function list-size to return size information about backups #2

Closed johnr14 closed 3 years ago

johnr14 commented 3 years ago

Added a list-size that returns more information. It is slow, but it works and provide a better view of the space used.

Here is an example :

 ./vzborg list-size
                                               Original size      Compressed size    Deduplicated size
vzborg-100-2021_02_14-19_26_12.vma                4.64 MB            995.19 kB              1.03 MB
vzborg-101-2021_02_14-19_26_26.vma                2.76 GB              1.75 GB             73.25 MB
vzborg-102-2021_02_14-19_27_47.vma                6.76 GB              3.69 GB            838.04 MB
vzborg-103-2021_02_14-19_29_41.vma                2.85 GB              1.81 GB             90.53 MB
vzborg-104-2021_02_14-19_30_32.tar               12.35 MB              5.61 MB              5.51 MB
vzborg-105-2021_02_14-19_30_37.tar              620.17 MB            212.95 MB             25.66 MB
vzborg-106-2021_02_14-17_06_41.tar              930.01 MB            435.08 MB             26.79 MB
vzborg-106-2021_02_14-19_31_23.tar              930.01 MB            435.17 MB             26.87 MB
vzborg-107-2021_02_14-17_59_52.tar                1.40 GB            619.18 MB             33.20 MB
vzborg-107-2021_02_14-19_31_37.tar                1.40 GB            619.17 MB             33.16 MB
vzborg-108-2021_02_14-17_02_08.tar                1.92 GB            905.32 MB             71.64 MB
vzborg-108-2021_02_14-19_32_04.tar                1.93 GB            907.14 MB             73.29 MB
vzborg-109-2021_02_14-17_02_41.tar                1.31 GB            587.23 MB             51.05 MB
vzborg-109-2021_02_14-19_34_01.tar                1.31 GB            576.63 MB             39.92 MB
----------------------------------------------------------------------------------------------------
                     All archives:               24.33 GB             12.73 GB              3.61 GB

It seems that dedup size doesn't count all used blocks as total don't seem to match. Might be a bug in borg ?

Also fix line 195 about issue opened

Cheers !

Eeems commented 3 years ago

By the looks of it the all archives section isn't limited to the items listed, but instead is pulling the totals?

g3492 commented 3 years ago

Sorry, I do not know what happened, but I have been unaware of this, and other contribution till last week. I will be setting time next week, to advance the project. Thanks for your interest!

El vie, 21-05-2021 a las 07:30 -0700, Nathaniel van Diepen escribió:

@Eeems commented on this pull request.

In vzborg:

  • borgoutput="$(borg info ${borg_extra} ${vzborg_repo} -P ${save_file} | grep 'This archive:' | sed 's/This archive:/'$save_file'/' | sort)"+ echo "$borgoutput" Any reason you aren't just doing the following?

⬇️ Suggested change

  • borgoutput="$(borg info ${borg_extra} ${vzborg_repo} -P ${save_file} | grep 'This archive:' | sed 's/This archive:/'$save_file'/' | sort)"- echo "$borgoutput"+ echo "$(borg info ${borg_extra} ${vzborg_repo} -P ${save_file} | grep 'This archive:' | sed 's/This archive:/'$save_file'/' | sort)"

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

[ { @.": "http://schema.org", @.": "EmailMessage", "potentialAction": { @.": "ViewAction", "target": " https://github.com/g3492/vzborg/pull/2#pullrequestreview-665529936", "url": " https://github.com/g3492/vzborg/pull/2#pullrequestreview-665529936", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { @.": "Organization", "name": "GitHub", "url": "https://github.com" } } ] --

Gustavo Benjamin