If you are new to TikTikTalk ? Your first verification mail might be in your spam folder.Check there and move it to your inbox to complete registration or account verification process..
Commandité
sociofans

How to delete Backups in WHM/Cpanel with terminal

0
3KB

Deleting old backups from the /backup directory in WHM or Cpanel is a complex process if you are managing a VPS server. However, if you are using shared web hosting companies like Namecheap and SiteGround, things are much simpler as you can delete backups with a single click using their customized backup systems or Softaculous.

Backup Problems

When I Installed WHM for the first time, I enabled monthly, weekly, and daily auto backups. My website disk usage of 10 GB suddenly rose to 99 GB within a few weeks. Buying more disk space was not an option because using more than 100 GB was not making financial sense. Therefore, I resorted to finding out ways of decreasing disk usage by removing old backups.

Below is how I managed to delete the backups after several hours of my website being down, reading tutorials, and failed command attempts.

How to delete Backups in WHM using Terminal

We are going to use the WHM terminal to delete the backups. You can also use an SSH client like PuTTY. This procedure assumes that you have used Terminal before and understand what you are doing.

Open Terminal in WHM or using PuTTY and log in using your root credentials then start running the commands below (do not include # before the commands).

  • Check disk space: # df -h
  • Go to the backup folder: # cd /backup
  • Check backup dates to delete (daily, weekly, or monthly): # dir
  • Backup dates will be listed in this format; 2019-11-26 monthly transports.db 2023-02-17 weekly
  • Run this command to delete backups by date: # rm -rf  2019-11-26

Replace the date above with your backup date.

IMPORTANT! Kindly note that if you run the command “rm -rf” without dates or a specified folder you will delete everything. Therefore proceed with caution. If you do not know what you are doing then DO NOT use the “rm -rf” command.

To go back and check if the disk usage has reduced after the deletion, run the command: # cd ..

cd..” means go back by one folder.

Conclusion  – Backup tip

If you want to avoid running out of disk space, do not keep more than one backup per day.  Also, ensure that you have carefully read the backup configuration options in WHM, then enable or disable scheduling and retention options that are necessary and unnecessary respectively.

Commandité
Commandité
Rechercher
Commandité
Catégories
Lire la suite
Networking
Deck Software Market 2024-2032 Size, Share, Trends, Growth Drivers and SWOT Analysis Report
The Winning Report [Growth Rate, Demands, Status, and Forecast 2032], published by Econ Market...
Par Alexalee30 2024-05-26 09:42:50 0 3KB
Autre
Contact Center Analytics Market Higher Mortality Rates by 2030
The Global Contact Center Analytics Market Analysis According to Market Research Future (MRFR),...
Par Technews 2023-02-27 10:52:58 0 5KB
Autre
Global Automatic Power Factor Controller Market Size, Share, Industry Analysis, Growth, Trends Development And Forecast to 2032
The global Automatic Power Factor Controller Market is expected to reach USD 1.67 Biliion by...
Par rubeyewilson 2025-04-23 09:55:51 0 209
Autre
Press Release: Laser Diode Market: Advancements in Laser Technology for Various Applications 2024
  The global laser diode market is expected to grow at a 8.25% CAGR from 2024 to 2030. It...
Par Monika312 2024-07-18 05:04:12 0 2KB
Networking
Axial Flux Motor Market 2024-2032 Size, Geographic Scope, Share, Trends and Growth Analysis Report
The Axial Flux Motor market refers to the market segment related to axial flux motors, also known...
Par Alexalee30 2024-04-23 04:57:57 0 2KB
Commandité