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!

Restoring only system and cpanel configs from backup

Discussion in 'Data Protection' started by EthraZa, Aug 28, 2009.

  1. EthraZa

    EthraZa Member

    Aug 24, 2009
    Likes Received:
    Trophy Points:
    I have 2 servers setup in a HA environment using heartbeat. My home directories and database directories are transfered in real time to the secondary server with drbd.
    On the primary server, I'm doing a daily cpbackup and coping it over to the secondary server.

    Now my questions are...

    a) How can I restore the backup on secondary by script? There is some script in cpanel's /scripts folder that do that for me? Since I already have the users home and mysql in place, there is some way to restore only the system and cpanel files and directories (by script)? This script can be run with the cpanel service stoped? This script need to have access to the home directories?

    b) If not, I'll need to write my won restore script, in that case, restore the files in dirs and files backup directories is enough to get cpanel work flawless on secondary server?
    And about files like crontab file for the users?

    c) How to add directories and/or files to the cpbackup routine (ie. add /etc/csf to backup)?

    #1 EthraZa, Aug 28, 2009
    Last edited: Aug 29, 2009
  2. MattCurry

    MattCurry Well-Known Member

    Aug 18, 2009
    Likes Received:
    Trophy Points:
    Houston, Tx
    Backup Questions


    To use the command line to restore an account would be one thing, and that backup would have to have been made by cPanel. I can give you a link to a scripts list that would help you out. However, if you are trying to do more than that, and that's what it appears you will have to create a script to do what you are attempting. That would unfortunately not be something I could do for you. However, you could create a script at /scripts/postcpbackup that would run after the backup is done. That may help with that you are trying to do. Please let me know if you have any other questions.
    Cpanel Scripts « L i n u x S t u f f s
    Thank you,
    Matthew Curry

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