Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Member
    Join Date
    Oct 2006
    Posts
    168

    Default WHM backups contain database?

    Do the daily, weekly and monthly backups contain databases? If so, which directory are they located in?

  2. #2
    Member
    Join Date
    Aug 2002
    Posts
    1,120

    Default

    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. #3
    Member
    Join Date
    Oct 2006
    Posts
    168

    Default

    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. #4
    Member
    Join Date
    Aug 2002
    Posts
    1,120

    Default

    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. #5
    Member
    Join Date
    Oct 2006
    Posts
    168

    Default

    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:
    Full Backup Restore
    Enter the username for the account you wish to restore:
    This feature will restore full backups, cpanel backups and cpanel move files in the format of: cpmove-user.tar.gz, user.tar.gz, backup-date_time_user.tar.gz

    The files must be in one of these directories on the server: /home,/usr/home,/web,/home2,/home3,/root,/usr

    You must upload the file to one of the above locations before using this feature.

  6. #6
    Member
    Join Date
    Aug 2002
    Posts
    1,120

    Default

    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. #7
    Member
    Join Date
    Oct 2006
    Posts
    168

    Default

    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!

Similar Threads & Tags
Similar threads

  1. Large database backups
    By cyc in forum Data Protection
    Replies: 2
    Last Post: 07-20-2010, 09:12 AM
  2. Only Allow Database Backups
    By adiant in forum Feature Requests for cPanel/WHM
    Replies: 2
    Last Post: 12-23-2009, 09:40 AM
  3. Only Allow Database Backups
    By adiant in forum Data Protection
    Replies: 0
    Last Post: 12-12-2009, 06:37 PM
  4. Partial MySQL Database Backups
    By aristile in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 04-18-2008, 05:28 PM
  5. How do i upload database backups?
    By Obinice in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 03-30-2004, 05:30 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube