Deleting /backup directory backup files from WHM Control Panel VPS Server using an SSH client like PuTTY is an easy task. Mostly we need to do this when we use a VPS server. To delete Server backup from WHM or cPanel make sure you are using the command s properly. Let’s discuss this WHM Weekly/Monthly backup deletion in detail.
Friends, today I was looking for one of the articles about how to delete /backup folder backups from WHM Server or cPanel. After searching for half an hour I rarely got any wonderful results to solve my problem of insufficient space as when I look into my WHM Control Panel,
I can see that I have 500 GB of SSD space on my server but in that only I left with 10% free.
So, now the question comes how will you delete the backup of all the clients and the customers you have on your server. That’s why I look into this issue and I found nothing.
The purpose of writing this article is to let you know about this backup deletion from the server in a proper way using any ssh client like putty.
If your server is having space crunch then how can you delete your old backups? In other words, I can say, how will you delete weekly/monthly or daily backup files from /backup or whatever the backup folder you have decided while saving the backup configuration.
Deleting WHM Backups from /backup folder/directory
So here are the steps that you need to follow if you are deleting the backup file from WHM sda2 sda3 partitions or /backup folder.
You need to download any SSH client like PuTTY. Using PuTTY you can access your server from SSH client.
Accessing WHM Server Using PuTTY
Here are the general steps you need to take to use PuTTY:
1. Install PuTTY and run it.
2. Specify the hostname or IP address for your server and hit ‘open’ to initiate the connection. You can leave all options to default. If this is the first time to connect to the server, you will have to accept its SSH certificate.
3. Specify root (if you have root access on your server) or your cPanel username.
4. Specify your password.
The above steps would allow you to log in an SSH server with a default setup.
To make it more secure best hosting like Siteground have made additional tweaks such as changing the default SSH port, substituting password authorization with keys, and many others. You need to contact your hosting provider if you don’t know your port.
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 the backup directories for deletion on WHM Server
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
Conclusion – Backup Deletion from VPS Server
Whenever we use WHM Backup Configuration to create our client’s and customers’ website backup on a regular basis then it is totally common that we will run out of space soon.
In such circumstances we need to take care of our system space and whenever there is a space crunch we have to delete our old backup from / backup directory using any of the ssh clients like we have used PuTTy here.
I hope now you have got the clear idea of how will you delete any backup.