Additional show option#2480
Conversation
|
Hello arcsinhx, On behalf of the team, thank you for your contribution and taking the time to improve Back In Time. We appreciate it. This looks like a fine and high-quality PR. Your PR will be reviewed as soon as possible. I have to put you on the wait list, like all other currently open PRs. The reason is I am in the middle of re-writting the mount-subsystem from scratch (#2449 is the main PR collecting each of the several modifications). Currently I am working on SSH profiles (#2462), after that I need to implement encrypted SSH profiles and finally I have to do some clean up. Nearly every file in the repo is affected, so be prepared for merge conflicts. The codebase is not in the shape doing this in clean isolated steps. I don't like to slow down a contributor, but I think it is the cleanest way. It still will take several weeks. Watch #2449 for progress in this matter. Please see the projects background information to get an idea about our workflow and priorities: Regards, |
|
Here are the two ./backintime show --usage --profile 1
Total disk usage: 3.0 GiB
20260510-000520-214
20260510-165800-738
20260511-105140-494
./backintime show --usage --profile 1 --last
Total disk usage: 4.0 MiB
20260511-105140-494 |
|
Very nice. If I am right, with this we could also calculate the storage savings? Calculate the usage of each single backup, summarize them and relate that to the total usage number. Total disk usage: 3.0 GiB (saving 80% of disc usage because of hardlinks)
20260510-000520-214
20260510-165800-738
20260511-105140-494 |
|
Yes, we can use |
|
The new mount subsystem is read for testing incl. full gocryptfs support as encfs replacement. |
Summary
Add a new --usage option to the show subcommand to display the total physical disk usage of all backups in a profile. It appends a "Total disk usage" line above the existing backup listing, showing the total physical disk consumption of all backups in the profile, correctly accounting for hard links. Physical disk usage is calculated via a single du -sbc call across all snapshot directories. The --last option with --usage will lead to show the disk usage of the last backup(including the hard link targeted file)
First contribution introduction
I'm a undergraduate user who used backintime for about two months. And I found that each time searching the profile path and look its disk usage is a little trouble, so I add a --usage option for
showsubcommand to avoid these redundant steps.