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.

cpbackup and large databases

Discussion in 'Data Protection' started by Brian_Wilson, Jul 29, 2005.

  1. Brian_Wilson

    Brian_Wilson Member

    Joined:
    Jul 28, 2003
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    I have 2 cpanel servers dedicated to running just one web site (one for web, one for database).

    The databases are pretty large, the mysql dir is over 2GB.

    The problem I'm having is cpbackup fails most of the time. Maybe 1 out of 5 backups actually complete.

    Can anyone provide any help or suggestions to get more reliable backups out of cpbackup for mysql databases, or do I need to find another backup solution all together?

    I'm not really sure what other information you may need to help, so just ask if you need more info.

    Thank you.
     
  2. Blue|Fusion

    Blue|Fusion Well-Known Member

    Joined:
    Sep 12, 2004
    Messages:
    378
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Cleveland, Ohio
    You can try backing up the MySQL databases yourself through SSH.
    mysqldump --opt -uUSERNAME -pPASSWORD --database DATABASE > dbbackup.sql
     
    #2 Blue|Fusion, Jul 29, 2005
    Last edited: Jul 30, 2005
  3. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    I'd go along with that. Disable MySQL backups from the cPanel backups and do it manually as Blue|Fusion suggests.
     
  4. jamesbond

    jamesbond Well-Known Member

    Joined:
    Oct 9, 2002
    Messages:
    738
    Likes Received:
    1
    Trophy Points:
    18
    What is the size limit of databases cpanel should be able to handle (i.e. making reliable backups) ?

    Doesn't cpanel also backup the complete /var/lib/mysql besides making individual db backups ?
     
  5. jamesbond

    jamesbond Well-Known Member

    Joined:
    Oct 9, 2002
    Messages:
    738
    Likes Received:
    1
    Trophy Points:
    18
    Another thing, in order to have "reliable" db backups shouldn't the tables be locked to prevent corruption? Does CPanel backup do this?

    I've seen people recomminding using mysqlhotcopy which does exactly that.

    http://dev.mysql.com/doc/mysql/en/mysqlhotcopy.html
     
  6. Blue|Fusion

    Blue|Fusion Well-Known Member

    Joined:
    Sep 12, 2004
    Messages:
    378
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Cleveland, Ohio
    I'm 90% certain that the cpbackup uses the same mysqldump command that I posted. Locking the tables is pretty much required to perform a backup of a database. The command I put above already does that with the --opt option.
     
  7. Brian_Wilson

    Brian_Wilson Member

    Joined:
    Jul 28, 2003
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    File limit on the dump

    The one thing I've noticed, the cpbackup fails when the backup.sql dump file gets to 1.99gb.

    I'm assuming this is from the 2gb file size limit in Nix.

    If that is the case, then there really is no way for me to use mysql dump because it will always be over 2gb.

    Am I correct in this? And if so, what are my other options besized manually having to shut down mysql, gzip the db and ftp the file to the backup location?


    Sorry if the questions seem dumb and obvious, but we all have to start somewhere.
     
  8. Blue|Fusion

    Blue|Fusion Well-Known Member

    Joined:
    Sep 12, 2004
    Messages:
    378
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Cleveland, Ohio
    The file size limit on *NIX is long in the past. The only thing that would limit the file size to only 2GB is if you're backing up to a remote filesystem (namely an SMB mount). The Samba client and server is only limited to a 2GB transfer limit.
     
Loading...

Share This Page