We do not store the name or size of each part anywhere.
The part name is easy to deduce. The naming pattern for JPA files is .j01. .j02, ..., .jpa, for JPS files it is .j01, .j02, ..., .jps and for ZIP files it is .z01, .z02, ...., .zip. Knowing the number of parts (which is stored in the database) we can produce an accurate list of the names of the part files.
The sizes, however, are another kettle of fish. You might think that the full parts (.j01, .j02, ...) have a file size that's equal to the part size for archive splitting. While this is typically the case it's not necessarily the case. They might be a few bytes smaller when after putting a full file in there the part size minus the current file size is smaller than the size of the header of a new file record. This is rare but it does happen. Therefore this size could be a few bytes off.
Even if that was the case we couldn't know what is the size of the last part (.jpa, .jps, or .zip) reliably. For single part archives this is easy: it's the recorded backup size in the database. When using remote storage and you DO NOT have enabled both options to delete the files after uploading and the immediate upload as soon as the archive part is ready we could assume that it's the total size of the backup minus n-1 times the part size where n is the number of parts of the backup archive. However, this is contingent to each full part being exactly the part size which, as I said, is not necessarily the case. Therefore this size could also be a few bytes off.
Moreover, when using remote storage and you DO have enabled both options to delete the files after uploading and the immediate upload as soon as the archive part is ready we can't deduce individual part sizes, period.
Storing the individual part sizes would be the better option but it's impractical. We could implement it two ways. One is using a second database table which records the backup ID and part number along with the part size in bytes. This would make the Manage Backups page very slow to load because we would need to join two very large tables which is abysmal for performance. The other option would be to store this list as a JSON encoded field in the #__ak_stats table. However, if your backup has hundreds of parts (believe me, it's far more common than you may think!) we end up with a supermassive query which might exceed MySQL's packet size and cause the backup to fail with a database error. Even if we decided to drop support for any MySQL version older than 5.7 and used MySQL's built-in JSON handling features to append to this JSON-encoded field we'd run into the same MySQL maximum packet size issue when restoring the backup of the #__ak_stats table, i.e. your restored sites would not know about older backups.
There are other more subtle issues which have to do with the implementation of archive import, backup management and the JSON API among other things but they are secondary and relatively easier to handle. The main problem is that we would either have potentially inaccurate sizes reported or we would get into a situation where we have backup and restoration issues just to report backup file sizes in the email.
As I said, weighing all our options, not reporting the backup size in emails is actually the best course of actions with minimal disruption for our clients.
To make it abundantly clear: you are not the first one to think about reporting file sizes. I did think of that already, a long time ago – about ten years ago, actually. I already considered what it would take and how it would affect the component. In the end of the day reporting individual file sizes is not a critical feature but trying to implement it can and will cause issues in critical features (you can't really publish backup software if you know there are preventable issues during backup and restoration that you could solve by removing the non-critical feature that's causing them!).
So, I have to insist that this is a feature that I will not implement not because I don't care or don't know how but exactly because I do care, do know how and fully understand the second and third order effects of its possible implementations. It's easy to say yes to all features, it's really hard to know when to say no. That's the difference between bad and good software. If you've ever wondered why Windows, macOS, Android, iOS, GNOME and KDE seem to drop features, that's why. Delivering good quality, consistent software frequently requires removing or refusing features which cause more trouble than the marginal benefits they deliver.
Nicholas K. Dionysopoulos
Lead Developer and Director
🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!