Help! My server drive is nearly full
This morning I came on shift and my colleague told me that a client was on live chat telling us that his VPS Server had gone down and all websites were showing an error. It turns...
This morning I came on shift and my colleague told me that a client was on live chat telling us that his VPS Server had gone down and all websites were showing an error. It turns out that the user had maxed out his disk allocation causing MySQL and other services to fail to start properly. So aside from increasing the disk space how can you check large files in your server or on your reseller account.
Reseller Large Files
If you have a reseller account just put a ticket in and we have a script that we can run that will output all the files over a certain size for the accounts owned by your reseller account user. Tell us what size you want us to check eg 30MB and we can run the script and send you the results.
VPS, Cloud or Dedicated Server
In order to check the large files on your server you do need SSH access via the root user. If you are not familiar with command line and prefer us to run this command for you just log a helpdesk ticket and we can gladly do this. The command below will allow you to scan your server for all files over a certain size eg 30MB and you simply edit the command to tell it what size to search for.
find /home/ -path /home/virtfs -prune -o -type f -size +30M -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'
Once you run the command you can see what files are over 30MB in this case and delete anything that is no longer needed such as large log files, old backups etc.
Housekeeping is always a good thing and by checking for large files (some of which may no longer be needed) you may be able to free up space from your hosting before purchasing additional space. Just be careful when deleting files and double check before removing anything. If you use FIle Manager in cPanel to delete files (recommended if you are a novice ssh user) remember to empty the Trash folder as well once you are sure the files are not needed. If you use SSH to delete the files there is no Trash and once deleted the files are gone so be extra careful.