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
Debbie Kurth is the founder of Multimedia Designs, LLC and holds a BS degree in Computer Engineering/Mathematics plus minor in Music. For many years she worked as a Walt Disney Imagineer in the team creation such re-known rides as Buzz Light Year, Start Tours, Rebel Spy and other attractions. She also is an equestrian and uses this knowledge to creating a online presence for small business and equestrian websites, including holding the patent for all Online Horse Shows in North America. VirtualHorseSport.com is the results.