Backup size bigger than the actual files

DoubleUPh

Registered
Mar 28, 2022
3
1
3
Indonesia
cPanel Access Level
Website Owner
Hello, I have a question regarding backing up files. Why is my file size after I back up larger than the actual files size in the file manager? I have a similar experience while compressing my public_html folder. The contents of the folder show no more than 900KB file size, but after compressing the folder, I got myself with 6.67GB zipped said folder (public_html). May I know what is the reason? And how to get the smaller file size while backing up?

Thank you
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
15,261
2,432
363
cPanel Access Level
Root Administrator
Hey there! That's definitely odd behavior, and we'll need more details to point you in the right direction.

Can you run this command on the server to get the total size of the directory on the disk?

Code:
du -sh /home/username/public_html/
Just replace "username" with the cPanel user you are working with.
 

DoubleUPh

Registered
Mar 28, 2022
3
1
3
Indonesia
cPanel Access Level
Website Owner
Thank you for your reply @cPRex. I already run the code on the terminal, and it showed me the total files I have in public_html, which is 7.6GB. But it is weird, if I check the file myself from the file manager, there is none of the file folder that is larger than 900KB (picture shown below).cpanel1.PNGcpanel2.PNGcpanel3.PNG
 
Last edited:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
15,261
2,432
363
cPanel Access Level
Root Administrator
That is normal behavior for a directory listing. Even directly in the Linux terminal, all directories will show the default size of the directory itself, not the directory and contents. Here's an example from a cPanel user on my personal system:

Code:
drwx------.  4 username username 4.0K Mar 30 12:15 logs
drwxr-x--x. 13 username username 4.0K Mar  8 18:08 mail
drwxrwxr-x.  4 username username 4.0K Aug 10  2021 perl5
drwxrwx---.  3 username username 4.0K Mar 29  2021 public_ftp
drwxr-xr-x. 21 username username 4.0K Mar 29 20:29 public_html
drwxr-xr-x.  2 username username 4.0K Mar 29 15:43 .razor
drwx------.  2 username username 4.0K Mar 21 21:15 .spamassassin
However, there is a lot of data in public_html:

Code:
# du -sh public_html/
1.3G    public_html/
 
  • Like
Reactions: DoubleUPh