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!

Downloading incremental backups

Discussion in 'Data Protection' started by uk01, Oct 20, 2017.

  1. uk01

    uk01 Well-Known Member

    Joined:
    Dec 31, 2009
    Messages:
    118
    Likes Received:
    11
    Trophy Points:
    68
    Hi,

    We have just switched over to incremental backups using nfs, which the transfer to a remote server.

    For the last 8+ years we've downloaded the tars of cancelled or transferred accounts to our office computers for safe keeping or restores in the event they are needed again.
    (especially those for websites we develop)

    If we want to create a tar of an account on the backup server, can we just select the date/account we want to tar and via the hardlinks it will create a restorable tar file of that account?

    Eg if we keep 7 days backups and we select /2017-10-17/username it will create a full tar of how the account was on that day using the hardlinks in the incremental files?

    Or if we selected the latest backup it would create a full tar of that.

    If this works, it will of course be MUCH slower as backup servers are low spec high storage, but at least we could get a working tar if we needed one for storage or to give to a customer who wants it.

    Thanks
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,367
    Likes Received:
    1,857
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    You'd want to first create the archive itself using the "tar" utility. The following StackOverflow explains how this works when using the "tar" utility:

    Dereferencing hard links

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. uk01

    uk01 Well-Known Member

    Joined:
    Dec 31, 2009
    Messages:
    118
    Likes Received:
    11
    Trophy Points:
    68
    Hi Michael,

    Thanks, I did some tests on an account with no changed files.

    First backup
    /backups/2017-10-23/accountname
    Downloaded the folder via Cyberduck = 902mb

    OK - full folder download from first backup

    Latest backup
    /backups/2017-10-25/accountname
    Downloaded the folder via Cyberduck = 902mb

    OK - so it downloaded all files via the symlinks


    Tar test

    First backup
    /backups/2017-10-23/accountname
    Tar via Cyberduck to accountname.tar.gz = 788mb

    OK - full size tar from first backup

    Latest backup
    /backups/2017-10-25/accountname
    Tar via Cyberduck to accountname.tar.gz = 788mb

    OK - so it created tar via the symlinks


    SSH tar test
    tar -zcf accountname.tar.gz /backups/2017-10-23/accounts/whmwork
    788mb

    tar -zcf accountname.tar.gz /backups/2017-10-25/accounts/whmwork
    788mb


    So it seems the tar does follow symlinks ok and creates an archive.

    You linked me to another article which mentions
    -h, --dereference
    follow symlinks; archive and dump the files they point to

    --hard-dereference
    follow hard links; archive and dump the files they refer to

    Which of these and where/why do we need to use them?

    Thanks
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,367
    Likes Received:
    1,857
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice