NeoTechNomad

Member
Jan 22, 2020
10
3
3
Ottawa, Ontario, Canada
cPanel Access Level
Root Administrator
VPS: CENTOS 7.7 xen hvm v84.0.21
Received warning email (see "Disk Usage warning email" attachment):
===
The filesystem “/” mounted at “/” reached “warn” status because you currently use 86.45% of its available blocks.
Notification Type: warn ⚠
Server:
Primary IP Address:
Filesystem: /
Mount Point: /
Percent Used:
86.45%
Disk Block Usage:
Used: 47.94 GB
Available: 7.98 GB
Total: 58.93 GB
ChkServd Version: 17.0
===
Checked Disk Usage in WHM (see "Disk Usage screenshot" attachment)

I will admit that I am a bit out of my depth here.
I am the site admin for a website which the owner had moved from a shared server to its own 60GB VPS on a new host just a couple of weeks ago.
It is the only site on the VPS.
I am quite familiar with cPanel, but I am in the midst of a very steep learning curve understanding WHM/cPanel and do not have a complete grasp on everything.
I am at a loss to understand why the disk is almost full (49GB outof 59GB) when the site itself is only 12 GB in size and also why the Filesystem and Mount Point are not named.

Any assistance with this would be greatly appreciated.
 

Attachments

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,297
1,251
313
Houston
HI @NeoTechNomad

From what I see, it looks like you don't have separate mount points on / - everything is present there with the exception of /tmp. This means that everything, from the site to backups if you've got them enabled is on the same mount point. If the site is only 12GB, I'd first check to see how long you're retaining backups on the server as most of the time this is a result of storing too many locally.

You can drill down into the disk usage specifics from the command line interface or if you have it, terminal within WHM by running the following (or similar) commands:



Code:
cd /
du -h --max-depth=1
This will give you the disk usage allocation starting at /, if you need more information on a specific directory, /var/, for example, you'd run the following:

Code:
cd /var/
du -h --max-depth=1
A lot of times I only want to see what's using gigabytes of data so I'll modify the command to be something like the following:
Code:
du -h --max-depth=1 |grep G
 

NeoTechNomad

Member
Jan 22, 2020
10
3
3
Ottawa, Ontario, Canada
cPanel Access Level
Root Administrator
Thanks, cPanelLauren
After getting more familiar with the environment, I rechecked backup config and realized that retained backups was still at 5.
I ran a force/debug backup with config at:
==
- compressed
- daily backup
- retention = 1
- strictly enforce retention
- backup system files
- no accounts
- entire MySQL directory
- retain backups in the Default Backup Directory
==
Then checked System Health > Disk Usage - 29G used out of 59G & 28G available - so much better.
Waited for scheduled backup and disk usage remained at above numbers.
Ran the codes you posted and they gave me the info I was looking for.

So it seems that the backups were taking up all the extra space.
When I start sending the backups offsite (site owner has not chosen offsite location yet) and eliminating the copy on the server, then the numbers will drop even more.

Again, thanks, cPanelLauren
 
  • Like
Reactions: cPanelLauren

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,297
1,251
313
Houston
Can I delete backups in the default backup directory from terminal?

You sure can, you can use rm to do this from the directory:

Code:
rm -rf <filename>
 

NeoTechNomad

Member
Jan 22, 2020
10
3
3
Ottawa, Ontario, Canada
cPanel Access Level
Root Administrator
Perhaps I am missing something, but I see no backups here;

[[email protected] ~]# cd /
[[email protected] /]# ls -lah
total 96K
dr-xr-xr-x 19 root root 4.0K Feb 5 14:54 .
dr-xr-xr-x 19 root root 4.0K Feb 5 14:54 ..
-rw-r--r-- 1 root root 0 Dec 11 13:13 .autorelabel
drwx--x--x 4 root root 4.0K Feb 5 14:57 backup
lrwxrwxrwx 1 root root 7 Dec 11 13:06 bin -> usr/bin
dr-xr-xr-x 5 root root 4.0K Jan 18 00:30 boot
drwxr-xr-x 17 root root 2.9K Feb 3 22:56 dev
drwxr-xr-x 99 root root 16K Feb 5 15:00 etc
drwxr-xr-x 6 root root 4.0K Jan 20 17:31 home
lrwxrwxrwx 1 root root 7 Dec 11 13:06 lib -> usr/lib
lrwxrwxrwx 1 root root 9 Dec 11 13:06 lib64 -> usr/lib64
drwx------ 2 root root 16K Dec 11 13:06 lost+found
drwxr-xr-x 2 root root 4.0K Apr 11 2018 media
drwxr-xr-x 2 root root 4.0K Apr 11 2018 mnt
drwxr-xr-x 4 root root 4.0K Dec 11 13:21 opt
dr-xr-xr-x 145 root root 0 Feb 3 22:56 proc
-rw-r--r-- 1 root root 9.0K Jan 17 22:56 quota.user
dr-xr-x--- 14 root root 4.0K Feb 5 05:25 root
drwxr-xr-x 34 root root 1.8K Feb 5 14:57 run
lrwxrwxrwx 1 root root 8 Dec 11 13:06 sbin -> usr/sbin
lrwxrwxrwx 1 root root 25 Dec 11 13:19 scripts -> /usr/local/cpanel/scripts
drwxr-xr-x 2 root root 4.0K Apr 11 2018 srv
dr-xr-xr-x 13 root root 0 Feb 3 22:56 sys
drwxrwxrwt 12 root root 4.0K Feb 5 15:00 tmp
drwxr-xr-x 13 root root 4.0K Feb 3 22:56 usr
drwxr-xr-x 23 root root 4.0K Jan 28 00:25 var

So I ran the cmd this way and got:

[[email protected] ~]# cd /backup
[[email protected] backup]# ls -lah
total 72K
drwx--x--x 4 root root 4.0K Feb 5 14:57 .
dr-xr-xr-x 19 root root 4.0K Feb 5 14:54 ..
drwx--x--x 4 root root 4.0K Feb 5 02:00 2020-02-05
drwx--x--x 2 root root 4.0K Feb 5 05:53 .meta
-rw------- 1 root root 56K Feb 5 14:57 transports.db

I know the backup with the selected account is still in there because before the Disk usage was 29G out of 59G and since I ran it with the account it has been 39G out of 59G.

I forced the backup again with this configuration to see if it would eliminate the old backup...
==
- compressed
- daily backup
- strictly enforce retention, regardless of backup success : selected
- back up system files
- no user accounts selected to backup
- backup system files
- entire mysql directory
- default backup directory : /backup
- backup staging directory : /backup
- retain backups in the default backup directory : selected
==
...yet the old backup is still there, I just cannot seem to list it.

Would the backup be a file with a '.gz' file extension, as it is compressed?
 

NeoTechNomad

Member
Jan 22, 2020
10
3
3
Ottawa, Ontario, Canada
cPanel Access Level
Root Administrator
Success in listing:

[[email protected] ~]# cd /home
[[email protected] home]# ls -lah
total 9.8G
drwxr-xr-x 6 root root 4.0K Jan 20 17:31 .
dr-xr-xr-x 19 root root 4.0K Feb 5 14:54 ..
-rw-r--r-- 1 root root 530 Dec 11 13:23 0_README_BEFORE_DELETING_VIRTFS
-rw------- 1 root root 9.8G Jan 20 17:18 backup-1.20.2020_14-19-59_therevueadmin.tar.gz
drwxr-xr-x 2 root root 4.0K Dec 11 13:24 cPanelInstall
drwx------ 3 root root 4.0K Dec 11 13:33 .cpcpan
drwx--x--x 25 therevueadmin therevueadmin 4.0K Jan 22 00:54 therevueadmin
drwx--x--x 4 root root 4.0K Jan 25 08:45 virtfs

So the cmd to delete this backup would be...
rm -rf <backup-1.20.2020_14-19-59_therevueadmin.tar.gz>
...correct?
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,297
1,251
313
Houston
I guess it would have been helpful for me to request you cd into backups after you cd to / - I'm sorry for that.

From /backups you should cd to the directory here: drwx--x--x 4 root root 4.0K Feb 5 02:00 2020-02-05

That's where you'll find two folders, one called accounts and one called system - if you want to remove ALL the backups for that date you'd remove the entire folder.

The backup stored in /home is separate and much older - looks as though it was created on January 20th (unless that's the one you were looking for and in that case, great!)

So the cmd to delete this backup would be...
rm -rf <backup-1.20.2020_14-19-59_therevueadmin.tar.gz>
...correct?
The < > was just added as a placeholder, you don't need it in the command. For a tar.gz file you wouldn't need to recursive flag so you could get away with:

Code:
rm -f backup-1.20.2020_14-19-59_therevueadmin.tar.gz
As long as your pwd (present working directory) is /home/
 

quietFinn

Well-Known Member
Feb 4, 2006
1,222
87
178
Finland
cPanel Access Level
Root Administrator
The only thing was that it did not confirm or indicate that the backup was deleted, but I reran 'ls -lah' and it was gone.
By default the rm command does not show what has been removed, for that you can use option -v
For example:
Code:
rm -f -v *.tar.gz
 
  • Like
Reactions: cPanelLauren