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.

Full backup tutorial

Discussion in 'General Discussion' started by mealto, May 21, 2007.

  1. mealto

    mealto Well-Known Member

    Joined:
    Oct 20, 2006
    Messages:
    175
    Likes Received:
    0
    Trophy Points:
    16
    We have a 2nd harddrive on the server dedicated for backups. Is there a WHM tutorial somewhere where we can learn how to run daily & weekly backups in rotation?
     
  2. color

    color Active Member

    Joined:
    Aug 31, 2006
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    just mount second disk drive as /backup and turn backups on in WHM
     
  3. mealto

    mealto Well-Known Member

    Joined:
    Oct 20, 2006
    Messages:
    175
    Likes Received:
    0
    Trophy Points:
    16
    Is there a tutorial for the backup. Still learning how to set things up. Thanks.
     
  4. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
  5. mealto

    mealto Well-Known Member

    Joined:
    Oct 20, 2006
    Messages:
    175
    Likes Received:
    0
    Trophy Points:
    16
    Hi David,

    Thanks for the link. Looks like information provided there is pretty much the same as within WHM. We are new at this and have a few more questions.

    1. How do we set the time for the backsup to occur?

    2. Can we retrieve specific files (say 1 file) from within the backup if we needed to?

    3. Can we setup WHM backup to backup to 2 separate places as a safety precaution?

    Thanks in advance. Any tips you can share would be greatly appreciated.
     
  6. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    By default, backups occur at 1am (server time). However, to customize this go to WHM -> cPanel -> Plugins and scroll down to "cronconfig" (the list starts alphabetically then starts from "a" again halfway down). Check the "Install and Keep Updated" box then press the "Save" button at the bottom of the page.

    Now refresh your browser so that WHM reloads. On the left sidebar all the way at the bottom should be a link "Configure cPanel Cron Times" - click that.

    These parameters are standard cron parameters, and are explained at the bottom of that page.

    While this functionality is not available in WHM, when the files are compressed they are compressed using industry-standard formats for this reason (extraction of a single file as needed).

    Not at this time.

     
  7. mealto

    mealto Well-Known Member

    Joined:
    Oct 20, 2006
    Messages:
    175
    Likes Received:
    0
    Trophy Points:
    16
    Under cPanel, we only see "Install cPAddons". Is this the place? Once inside, we see a list of options but nothing that is similar to "cronconfig". Does this need to be tuned on somewhere?

    By the way, how do we tell what the server time is within WHM?


    Is there some sort of a file manager type interface where we can download the compressed file and use winRAR to unzip it?

    Thanks again David.
     
  8. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Sounds like you're on cPanel 10 - I'm trying to remember what it was called back then, I want to say Modules.

    WHM -> Server Configuration -> Server Time will display the current server time.

    Wherever you place your backups, you should see .tar files, you can simply download these and I believe WinRAR itself can browse the archives to allow you to extract a single file as needed.

    I will note that since incremental backups do not employ compression, if extracting a single file is of utmost importance - you may want to consider using incremental backups instead of the traditional compressed non-incremental backups.
     
    #8 cPanelDavidG, May 21, 2007
    Last edited: May 21, 2007
  9. mealto

    mealto Well-Known Member

    Joined:
    Oct 20, 2006
    Messages:
    175
    Likes Received:
    0
    Trophy Points:
    16
    Good memory. It is under Modules. Noticed this at the bottom of the module page:

    * cPanel is not responsible for any aspect of third party scripts/themes. All trademarks are owned by their respective companies. Please send all questions reguarding this feature to support@cpanel.net.

    Noticed this as well:

    Name: cronconfig
    Author: cPanel Inc.

    So this cronconfig is a cPanel script so you will fully support it? Just wanted to make sure we did not mess up anything that we could not get help from you to fix.

    Thanks for the backup tips. Is there a file manager within WHM for us to download the backup files?
     
  10. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    If we make it, we support it :).

    There are many third party plug-ins out there that we don't know the inner workings of (Fantastico for instance) and thus it's best for quality purposes that we let those who know those plugins best, support those :).

    There's no File Manager within WHM but you could always move those files to a cPanel user account you create and use File Manager that way. Just don't place backups in public_html or public_ftp to ensure the general public doesn't have access to your server backups as they likely contain sensitive information.
     
  11. mealto

    mealto Well-Known Member

    Joined:
    Oct 20, 2006
    Messages:
    175
    Likes Received:
    0
    Trophy Points:
    16
    Thanks, wanted to make sure we can get help! :)

    Good idea. How would we move the file to a user account? I think that is where we lack the knowledge to do so. We can SSH in to the server. Are there some simple commands that will help us copy the specific backup file over to a specific user account?
     
  12. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    When you login to SSH, you would use the following command to change to the backup directory (assuming you have set it to /backup):

    cd /backup

    Then you would perform a directory listing to view the files in that directory. You do that by using the following command:

    ls

    Find the name of the file you want to move. I'll assume for the sake of example, it is called filename.tar and move it to the home directory of a user named "fakeuser." I'd recommend copying the file instead of moving it so you don't inadvertently delete your only copy of a specific backup one day :). To do this, use this command

    cp filename.tar /home/fakeuser/filename.tar

    Then you can login to the cPanel account for user: fakeuser and manipulate that file using File Manager or download it using File Manager.
     
  13. mealto

    mealto Well-Known Member

    Joined:
    Oct 20, 2006
    Messages:
    175
    Likes Received:
    0
    Trophy Points:
    16
    David, thank you very much for the hand holding! It is very much appreciated. Tried the commands with a log file and it definitely works thanks! Used FTP to donwload the file. Could not figure out how to download using File Manager.

    Last question I promise :)

    Is there a free utility (that runs in Windows XP) that can extract the cPanel backup files?
     
    #13 mealto, May 21, 2007
    Last edited: May 21, 2007
  14. mealto

    mealto Well-Known Member

    Joined:
    Oct 20, 2006
    Messages:
    175
    Likes Received:
    0
    Trophy Points:
    16
    ok, backups ran last night. But after moving the backup file to a user account, it syas we have no permission to download the file via FTP. Any more tips?
     
  15. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Oh ya, you will need to change the owner of the files to the username for that account - sorry about that.

    Assuming the user is fakeuser and the filename in their home directory is filename.tar then you need to login as root and execute this command:

    chown fakeuser /home/fakeuser/filename.tar

    As for extracting the contents of the compressed files, most freeware and shareware utilities that deal with file decompression/compression should be able to handle it.
     
  16. mealto

    mealto Well-Known Member

    Joined:
    Oct 20, 2006
    Messages:
    175
    Likes Received:
    0
    Trophy Points:
    16
    ok, chown did it thank you!

    Does this mean all images, databases and DB users are all backed up? Essentially, the entire website?

    Can the backup schema be customized so it will backup say 7 days worth of daily backups and overwrite the oldest one when day 8 comes along? ie. keeping 7 days of backups for redundancy purposes?

    Thanks again for all your help David. It's appreciated!
     
  17. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Correct, all that information is backed up.

    As of right now, that schema isn't possible. What you can do though is have a daily, weekly and monthly backup for redundancy purposes though.
     
  18. mealto

    mealto Well-Known Member

    Joined:
    Oct 20, 2006
    Messages:
    175
    Likes Received:
    0
    Trophy Points:
    16
    Got it. We have turned on daily, weekly and monthly backups. How do we know (and set) which day of the week and day of the month to run the non-daily backups?
     
  19. mealto

    mealto Well-Known Member

    Joined:
    Oct 20, 2006
    Messages:
    175
    Likes Received:
    0
    Trophy Points:
    16
    So does anyone know how we can set the day of the week & month that cPanel runs the daily & monthly backup for? At the very least, what days are the defaults?
     
  20. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Weekly backups run 7 days after the last weekly
    Monthly backups run 30 days after the last monthly

    cpbackup determines when the backup last run from the date on the existing respective backup directory. So, if you want them to run on a particular day you will need to use the touch utility to set an appropriate modification date on the respective directory X days before you want the next instance to run.
     
Loading...

Share This Page