This seems a “junior” job that could be used as a developer training test.
Let’s start with the analysis.
- Are we going to implement only disk usage only in the email, only in the dashboard or both?
- how could we show it in the email?
- and in the dashboard?
The backup process is split in 3 steps:
- pre-backup to dump db and mount backup destination
- data copy
- post-backup to clean db dumps and unmount
I’d add an action to the pre-backup phase to “record” somewhere disk usage after mount.
Then, we need to find a way to insert the information in the email report and the dashboard.
Caution: the disk usage on the dashboard is recorded at time of backup, it’s not calculated when you login to the dashboard.
Also, we could add the action in the post-backup instead of pre-backup to report disk usage after the backup (maybe is better).
Those are the first things that came to my mind, any other issue I may have forgotten?
Any more hints?