WHM is a powerful server interface that allows many functions to be automatically process while hosting websites. Yet managing the server can be equally taxing as keeping the sites up to date and running properly. One of the weakness of the the system is that while backups can be created automatically, deleting those backups is not automatic function, despite the backup configuration implied user interface. The problem then is, the hard drive, unless you are using a remote storage, fills the disk, causing other problems. Thus deletion must be done manually.
The simplest way to perform this task is through the terminal option of the server. Here are the setup by step to achieve this goal.
Check File System Disk Space Usage
After logging in to your server, you can now check the disk availability in on your server using the command # df -h
The “df” command displays the information of device name, total blocks, total disk space, used disk space, available disk space and mount points on a file system and the df command provides an option to display sizes in Human Readable formats by using
'-h' (prints the results in human-readable format (e.g., 1K 2M 3G)).
After login to the root directory navigate to /backup folder using the command given below
# cd /backup
CHECKING AND REMOVING PAST BACKUPS
Once navigated you can see all the files and folders inside / backup folder using the command # dir
Now you need to navigate to the weekly folder or monthly folder or daily folder, whatever backup configuration you have on your server as in my case it was a weekly folder.
So, now I am going to navigate to quickly folder and after navigating the weekly folder I need to check what all backups I have inside that directory. This is what I have used –
[root@server ~]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 7.8G 0 7.8G 0% /dev
[root@server /]# cd /backup
[root@server backup]# dir
[root@server backup]# cd weekly
[root@server weekly]# dir
Now it’s totally up to you you want to delete the whole weekly folder or you just want to delete some of the backup files from there.
Deleting WHM backup using rm command
To delete the entire directory use the command # rm -rf directory_name
To delete a single file or single backup use the command # rm -f filename
CEO & Technical Director of Multimedia Designs, LLC, System Designer, Developer, Producer with 15+ years in the internet design and development space and 25+ years in the Software Development for the entertainment industry. Winner of the prestigious International Themed Entertainment Association award for interactive design. She holds a degree in Computer Engineering & Mathematics from California State University, Long Beach.