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.

WHM backups contain database?

Discussion in 'General Discussion' started by mealto, Jun 9, 2008.

  1. mealto

    mealto Well-Known Member

    Joined:
    Oct 20, 2006
    Messages:
    175
    Likes Received:
    0
    Trophy Points:
    16
    Do the daily, weekly and monthly backups contain databases? If so, which directory are they located in?
     
  2. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,381
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    I believe so. The backup script creates a MySQL dump of each database. I believe the database dumps are stored in the sql directory in the backup file.
     
  3. mealto

    mealto Well-Known Member

    Joined:
    Oct 20, 2006
    Messages:
    175
    Likes Received:
    0
    Trophy Points:
    16
    I see them now. I see. sql files that are decent sized (about 50 megs). Does this mean they contain all the data? I was sure some of those tables (as per phpmyadmin) were over 400 megs.

    And for system recovery, can we use WHM to automatically upload the 1 backed up file and rebuild the entire account (home, mysql, email etc...)? How would we do this for recovery purposes?
     
  4. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,381
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    The .sql files are database dump files. Basically these are just text files that contain all of the queries necessary to rebuild a database to the state that it was at when the dump was taken. I'm not sure how phpmyadmin calculates a table's size, though I would think that if it showed a table as being 400MB and the entire database dump is only 50MB then either phpmyadmin is misreporting, or the database dump is incomplete.

    Its been a while since I have used the WHM restore function. I believe in order to restore a database from the WHM, the backup file (the .tar.gz or the .tar file) has to be located in one of the daily, weekly, or monthly folders in your cpbackup folder, on whatever partition you are backing up to. You can then use the WHM to restore a single account and navigate your way to finding that backup file and restoring it will restore that backup file.

    I'm not sure how this restore is processed if the account is still on the server. For this reason I have always deleted said account from the server prior to restoring it from a backup. Though I'm not sure if that is good advice or not.
     
  5. mealto

    mealto Well-Known Member

    Joined:
    Oct 20, 2006
    Messages:
    175
    Likes Received:
    0
    Trophy Points:
    16
    I see the restore function in WHM now. You are right. You have to choose from daily, weekly or monthly. So the million dollar question, if the server spontaneously implodes and we have WHM backup files locally, how do we restore this on a new WHM server?

    Maybe we have to upload the backup files to the server and use: Main >> Backup >> Restore a Full Backup/cpmove file?

    Does this make sense? As per WHM:
     
  6. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,381
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    If your server completely dies and you lose both hard drives (ideally your backup drive would be on a completely separate hard drive than your main hard drive, thus minimizing the damage should one hard drive fail) but you have a copy of all of the accounts on your local computer, then you could just upload all of the backup files and place them in the directory:

    /backup/cpbackup/daily

    Then when you use the WHM to restore accounts, they will all be listed and you can restore them. (This assumes that your backup directory is set to /backup which may not be the case).
     
  7. mealto

    mealto Well-Known Member

    Joined:
    Oct 20, 2006
    Messages:
    175
    Likes Received:
    0
    Trophy Points:
    16
    Got it. Upload the backup files to the pre-specified directory and use WHM to reload them. That makes sense.

    Hope this can help others in the same boat for contingency planning and thanks very much!
     
Loading...

Share This Page