Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How do the backups work exactly?

Discussion in 'Data Protection' started by jd.miracles, Apr 13, 2017.

Tags:
  1. jd.miracles

    jd.miracles Registered

    Joined:
    Apr 13, 2017
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Utah
    cPanel Access Level:
    Root Administrator
    Hi,

    I have some questions regarding the way the backups work. I've looked through the WHM Backup documentation which hasn't answered all of my questions.

    On a GoDaddy Fully Managed Server, I'm currently running various backups:
    • Daily incremental backup every day except Sunday, single retention
    • Weekly incremental backup on Sundays, single retention
    • Monthly incremental backup, 1st and 15th of the month, single retention
    What I'd like to know is if there are hard links being created between the different incremental backups? I.e., between the daily and weekly backups, or the daily and monthly backups, for example.

    Checking via Terminal, I can see that my /home directory is currently at 406GB. When I run the du -h --max-depth=1 command inside the /backup directory, I get the following sized for the different backup directories:

    408G ./incremental
    165G ./weekly
    3.0G ./monthly

    When I first set up the backups, I was told by GoDaddy support that:
    • The weekly backup will automatically generate "hard links" to the daily incremental backups so that no data is duplicated unnecessarily on the server. In other words, the daily backup folder maintains a full backup of our server websites at all times; when the weekly backup runs on Sunday, the weekly backups folder (/backup/weekly/incremental/accounts) will be nearly identical to the daily backups folder (/backup/incremental/accounts) and since identical files don’t get duplicated, the weekly backup folder will be close to 0GB; over the course of the week, as files change and get added, the weekly backup folder will "collect" the original files from Sunday (the ones that will get overwritten in the daily backups folder) resulting in an increase in disk space used by the weekly backups folder; it will essentially "reset" again on Sunday.
    • The monthly backups do not generate "hard links" to the daily incremental backups.
    I totally understand the size of our /incremental backup folder. It's just slightly larger than the /home directory and this feels appropriate.

    However, if the notes I was given by GoDaddy support are correct, then how come the /weekly backup folder is so large? Today is Thursday, and there's definitely not been 165GB of file changes since Sunday. I've also checked the size of this folder on Sundays before, and I've never seen it show anything close to 0GB; in fact, it's actually stayed around the 165GB consistently throughout the week.

    The size of the /monthly folder doesn't make sense to me either if the above notes from GoDaddy are correct. It seems that, if no "hard links" are being created, then this folder should be at least the same size as the /incremental folder, and probably even slightly larger.

    I really appreciate any help you can provide that might shed some light onto this situation. I've tried getting more answers from GoDaddy, however, they haven't been able to really provide and help, since cPanel isn't their product; and in fact, the last thing I was told by them is that no hard links get generated at all between the three different backup directories.

    Here's the output to the command provided in "Guide To Opening An Effective Forums Thread":
    Code:
    /etc/redhat-release:CentOS release 6.9 (Final)
    /usr/local/cpanel/version:11.62.0.20
    /var/cpanel/envtype:virtuozzo
    CPANEL=release
    /usr/sbin/httpd: line 63: ulimit: open files: cannot modify limit: Operation not permitted
    /usr/sbin/httpd: line 64: ulimit: open files: cannot modify limit: Operation not permitted
    /usr/sbin/httpd: line 65: ulimit: open files: cannot modify limit: Operation not permitted
    Server version: Apache/2.2.32 (Unix)
    Server built:   Apr 10 2017 14:56:41
    Cpanel::Easy::Apache v3.34.12 rev9999
    PHP 5.6.30 (cli) (built: Apr 10 2017 14:59:58)
    Copyright (c) 1997-2016 The PHP Group
    Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    mysql  Ver 14.14 Distrib 5.5.54, for Linux (x86_64) using readline 5.1
    Thank you for the help! FYI, I'm new to this forum and only moderately experienced in accessing our server via SSH, but if there's any troubleshooting you can suggest, I'm very happy to try it out.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,419
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Your provider is correct about the hard links. I believe this issue here is simply a matter of the method you are using to check the disk space usage of the backup directories. The following StackOverflow thread offers some information about how space is calculated for hard links:

    Why do hard links seem to take the same space as the originals?

    For instance, you should notice that running the "df -h" command shows the actual usage on the system.

    I'd also like to note that cPanel 64 offers support for multiple incremental backups:

    64 Release Notes - Version 64 Documentation - cPanel Documentation

    Thank you.
     
  3. jd.miracles

    jd.miracles Registered

    Joined:
    Apr 13, 2017
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Utah
    cPanel Access Level:
    Root Administrator
    Thank you. What would be the correct way of checking for folder sizes of the backup directories?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,419
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    You can find a few methods of calculating the disk space without hard links on the following StackOverflow thread:

    How to get folder size ignoring hard links?

    Thanks!
     
Loading...

Share This Page