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.

Could this be a better way to set up a fall back server?

Discussion in 'Data Protection' started by doitsolutions, Aug 9, 2013.

  1. doitsolutions

    doitsolutions Registered

    Joined:
    Aug 7, 2013
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    ***Will pay or do favours for assistance*** (Wait, does that sound wrong?)


    Hello cPanel community,

    Below is a problem I believe I have a solution to but I am not capable of scripting the solution.
    I am getting better with Linux every day but I am not at the stage yet where I can make this happen (see solution section below). Please let me know if my theory will work, and if any of you can script this please let me know.

    I have googled the pants off this, and it seems that having a failover backup from live dedicated host (WHM / cpanel) to bachup dedicated host (with high availability) is not as easy as some are suggesting (eg. rsync all files etc).


    Problem:

    Fail option 1) Rsync-ing all files in the home directory incrementally - is great for website and email folder updates BUT does not contain databases (mounted / active, rsync will not work for this).
    Fail option 2) Rsync-ing the daily backup files that WHM can generate - IS BAD as it is a full transfer of data each time (no incrementals). I have over 110GB on 35 accounts due mainly to email and media data.
    Fail option 3) Could try to use fail option 1 above then script each database to mirror between servers (too messy and fragile)


    Solution (This should work):

    The live WHM server already generates the standard daily backups of all cpanel accounts.
    I need a script that will do the following:
    1) Un-compress these backup tars to a temporary sync location (and the homedir tars within each tar)
    2) Then use Rsync for it's fantastic incremental sync ability to transfer this uncompressed data to the backup WHM server.
    3) Then script the backup WHM server to tar this data up again (including homedir tars within the main backup tars)
    4) Then script the backup WHM server to import these backups (cpbackup) over the top of the existing accounts (terminate first?)


    End result will be this:

    If my main dedicated server blows up, all current data to the night before is not only safe, but ready to go live as soon as the domain name servers can propogate to the backup server. I want to do this rather than simply move backups off site and have the hastle of setting up a new server from scratch to restore the data to in a catastrophic situation where the live WHM server is FUBAR.


    My request:

    Can anyone help me write a script for the above?
    I can take care of the SSH key so we can script it all from one server.


    Other info:

    1) All of this would happen nightly (otherwise it is too much load on the server if 110GB (and growing) of accounts are backed up more often).
    2) No attempt to sync backwards from backup to live is to be made (I would manually do this after an emergency if needed
    3) Needs to log succesful updates and errors.

    I can either offer a return favour of some sort or even pay to get this done, give me an idea of what this is worth to you if you can do it.
    Thanks,

    Michael A.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,723
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    We do not allow developers to advertise their services directly on the forums, but you can browse the "Development Services" section on our application catalog:

    Development Services

    Thank you.
     
  3. doitsolutions

    doitsolutions Registered

    Joined:
    Aug 7, 2013
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    ok, dont quote me kn doing the work people, just let me know one thing:

    is this possible? Am i on the right track with my proposed solution or would it fail and why.
    thanks,

    Michael A.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,723
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    I don't see any problems with your proposed solution. As long as the backup files are generated by the cPanel backup system, it's fine to extract/compress them manually in your custom script.

    Also, feel free to vote for the following feature request:

    Remote Incremental Backups

    Thank you.
     
Loading...

Share This Page