Tracking Disk Usage Breakdown History

caleb1

Registered
May 18, 2023
2
0
1
Florida, USA
cPanel Access Level
Reseller Owner
Oftentimes my disk usage will randomly increase and I am not sure what causes it. It would be nice to be able to see a historical record of the disk usage breakdown by directory so I can see which directories are the culprit.

I am thinking I could regularly download the disk usage data so that I can keep my own records of what it is and when.

Does anyone know if there is a way to download a table or text file showing the breakdown of disk usage by directory?
I can copy and paste the table from the Disk Usage page into excel, but I must expand all the directories first and that is very time consuming. (an "expand all" button would be amazing).

Any ideas?
Thanks
 

Attachments

Last edited by a moderator:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
16,626
2,625
363
cPanel Access Level
Root Administrator
Hey there! What if you setup a cron that ran daily or weekly, or however often you'd like it scanned, that just had that output. Something like this would work well:

Code:
du -h /home/username > output.txt
You could then review your current output.txt file and compare it with a version taken from a recent backup if you notice a large change.
 
  • Like
Reactions: caleb1

caleb1

Registered
May 18, 2023
2
0
1
Florida, USA
cPanel Access Level
Reseller Owner
Hey there! What if you setup a cron that ran daily or weekly, or however often you'd like it scanned, that just had that output. Something like this would work well:

Code:
du -h /home/username > output.txt
You could then review your current output.txt file and compare it with a version taken from a recent backup if you notice a large change.
That does the trick! Thanks