Mar 1, 2021
9
0
1
Pulchowk
cPanel Access Level
Root Administrator
I want to create incremental backup in whm. I have setup incremental backup from backup configuration.

As far as I understood, incremental backup takes full backup at first and takes the backup of only changes things.

Here I have run a script to force take backup.

At first it has taken full back. The second time incremental backup should take the backup of only changes that have taken place in the account. But I can see it again takes full backup.

The first picture shows the first backup i.e. full back and rest of shows the another backup.

It is again taking full backup instead of incremental even when I have configured incremental backup.

As far I have understood, It only takes the backup of changed file. I have added new file after taking backup once and the second incremental backup should take the backup of only the changed folder. Is it?

Please let me know
 

Attachments

GOT

Get Proactive!
PartnerNOC
Apr 8, 2003
1,753
311
363
Chesapeake, VA
cPanel Access Level
DataCenter Provider
Incremental backups use hardlinks to unchanged files therefore the unchanged files are not getting backed up again they are just getting linked and therefore they take up no additional space and the backup goes much quicker. But it can be confusing because just in looking it does look like all the files are there.
 
Mar 1, 2021
9
0
1
Pulchowk
cPanel Access Level
Root Administrator
Incremental backups use hardlinks to unchanged files therefore the unchanged files are not getting backed up again they are just getting linked and therefore they take up no additional space and the backup goes much quicker. But it can be confusing because just in looking it does look like all the files are there.
So how to know if it has taken incremental backup or full uncompressed back up?
 
Mar 1, 2021
9
0
1
Pulchowk
cPanel Access Level
Root Administrator
Instead of "ls" you could check with "ls -lah" to see if you can see the linking structure.
I have enabled the incremental backup. I think if it is incremental backup, since I haven't changed any thing, there should not be any file as I have not changed any thing and all the files and folders are same as before. But it is still taking full backup as the previous date and it consumes memory.

In the attachments, there are backup of 2 days. You can see the data mentioned. And nothing are changed and I think if there is no change, it should show empty folder in case of incremental instead of showing all the files as previous. If it takes full backup than how does incremental differ from full backup? It is still taking space.
 

Attachments

Mar 1, 2021
9
0
1
Pulchowk
cPanel Access Level
Root Administrator
So how to know if it has taken incremental backup or full uncompressed back up?
I still can't understand about the hardlinks for the unchanged files. There in screenshot, it shows that it is taking full backup and consuming space. The main aim of incremental backup is to reduce the space of backup file and make it faster. But if it takes same space and results the backup same as it was before i.e. full backup, how it can incremental backup?
You can see in the attachment, all days incremental backups folder is taking same space. If it is incremental backup, since I haven't changed anything, it should consume less space. Its very confusing. Can you please guide me or refer me any document that shows demo about the incremental backup in whm.
 

Attachments

cPAdminsMichael

Well-Known Member
Dec 19, 2016
161
55
103
Denmark
cPanel Access Level
Root Administrator
Hi!
I think there are some misunderstanding here. With ls you are not seeing how much the directories (and its files and subdirectories) are consuming.
On a typical ext4 file system (I assume you'd use etx4 or xfs), the default inode size is 256 bytes and block size is 4096 bytes.

A directory is just a special file which contains an array of filenames and inode numbers. When the directory was created, the file system allocated 1 inode to the directory with a "filename" (dir name in fact). The inode points to a single data block (minimum overhead), which is 4096 bytes. That's why you see 4096 / 4.0K when using ls.

You'd need to use df -h or du -h --max-depth=1 to get any details about data consumption/usage.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
4,357
546
273
cPanel Access Level
Root Administrator
Your "ls" output looks normal to me.

You can check things with "du" as @cPAdminsMichael mentioned, but since the system uses links it will likely just report the file size of the linked path. If you'd like us to confirm things are working properly we'd be happy to check the system if you get a ticket submitted to our team.
 

cPAdminsMichael

Well-Known Member
Dec 19, 2016
161
55
103
Denmark
cPanel Access Level
Root Administrator
Actually, when using "du" for several directories, where there are hardlinks pointing to another directory in the du-scope, it will only count links once.
If you want to count/summarize all links, you can add the -l parameter. You can use that to compare full vs diff:

Count only links once: du -h --max-depth=1
Count every link: du -hl --max-depth=1
 
  • Like
Reactions: cPRex