cPanel - The restoring Database

Discussion in 'MySQL' started by richu, Jan 26, 2008.

  1. #1
    I have started the process of restoring my database , some 2 hours ago , and still i can see the same white page with text "RESTORING DATABASE" . Yes, i did everything correctly , i clicked that browse button , and provided my backup file . I don't what is happening . My question is , have any one of you tried to restore using cPanel ? If so , after restoring completely , did you get any message ? or the same text like i got "Restoring Database "
    Can anyone help me ?
     
    richu, Jan 26, 2008 IP
  2. Bryce

    Bryce Peon

    Messages:
    1,235
    Likes Received:
    93
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If you're trying to restore a database through a web interface, your subject to the servers timeout settings. On my dedicated servers, I have the timeout set to 30 seconds to prevent zombie processes. I think the apache default is 5 minutes (3000 seconds), if the process is hanging longer than the timeout, then forget about seeing a response from the server in a browser.

    btw, I highly recommend using software such as Navicat (http://www.navicat.com) to do your database work in. Also, from what I remember of the abortion called CPanel on my server, you're probably using PHPMyAdmin.
     
    Bryce, Jan 26, 2008 IP
  3. InFloW

    InFloW Peon

    Messages:
    1,488
    Likes Received:
    39
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I assume you're actually restoring via backup through WHM which in this case does not have any time out values that are suggested in the post above.

    If the database is large then this could explain why it is taking a very long time. However if it is small then most likely the page has timed out for you which can happen from time to time. If this is the case then the restoration would have continued in the background and should be completed.
     
    InFloW, Jan 26, 2008 IP
  4. Bryce

    Bryce Peon

    Messages:
    1,235
    Likes Received:
    93
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I forgot, Inflow, that CPanel is still using Apache 1.x and mySQL 4.x but still, each Apache request is spawned in a new process on the server, if the process times out, the database statement is "rolled back". If memory suits me, WHM does have a separate process (CPSRVD), however it runs off an Apache process on ports 2086-89.

    I guess the reason I might know this is because my hosting clients were having the exact same problem running backups of their mySQL databases when we had CPanel on one of our hosting servers, that's before we got rid of CPanel (and had to reformat the entire server to fix the mess CPanel caused by moving all the native configuration files and throwing our email system off QMail and into EXIM/Courier).

    Furthermore, allowing a server to go into an extended process, not timing it out is a total security vunerability as if CPanel isn't full of so many holes already.
     
    Bryce, Jan 26, 2008 IP
  5. InFloW

    InFloW Peon

    Messages:
    1,488
    Likes Received:
    39
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Well cPanel can run Apache 2.0.x and 2.2.x and has for quite a while and it can also run MySQL 5.x

    The restore functionality within WHM should not be confused with that of what cPanel for a user. The backup file is already on the server. The process that is doing the restoring is actually a background process and what you see is simply a display function. If you are to close your browser it will continue to restore.

    The restore system does system calls like cp for the files, mysql for db restoration and any other commands needed that you would do if you were sitting at the command line and restoring. It's nothing more than a bunch of perl scripts running system commands...

    So if you still believe this is a security issue you need to do some reading. Doing the process manually spawns the same processes which can run for extended periods of time depending on the size of the data. The only difference is we get a web based status opposed to one from the command line, however you can run restores from the command line as well.

    Finally you should have read the cPanel documentation before installing cPanel. It clearly states it must be a fresh machine. So I'm not sure what you expected to happen to qmail and other configurations when cPanel makes the assumption that the machine is going to run all the cPanel controlled applications.
     
    InFloW, Jan 26, 2008 IP
  6. jigolo

    jigolo Peon

    Messages:
    312
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    jigolo, Jan 26, 2008 IP
  7. X0G

    X0G Peon

    Messages:
    32
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    have you tried bigdump?
     
    X0G, Jan 27, 2008 IP
  8. pipes

    pipes Prominent Member

    Messages:
    12,766
    Likes Received:
    958
    Best Answers:
    0
    Trophy Points:
    360
    #8
    Guys, when restoring a MySQL database through cpanel, do i delete the database in place first before trying to restore?

    Note: the db is small, i haven't tried it yet, just need to know the correct way to do it, thanks.
     
    pipes, Apr 3, 2008 IP