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.

Table In use during restore

Discussion in 'Data Protection' started by christoval, Jan 28, 2009.

  1. christoval

    christoval Registered

    Joined:
    Nov 17, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    I have a 2.5 gig database that i am trying to restore. When restoring, the database gets hung up, due to a large table being "in use". the backup was created in a regular manner, so im not sure how it could even be in use when teh backup was made.

    My mysql proc list shows:
    Repair with keycache /*!40000 ALTER TABLE `table_name` ENABLE KEYS */

    and will not complete the rest of the restore.

    What can i do to repair this table? I assume simply repairing the table wont work because a repair query would wait for the "repair in keycache" process to finish first.

    any help?
     
  2. christoval

    christoval Registered

    Joined:
    Nov 17, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Ok, slight update, i got the rest of the account up, so if anyone knows how to run an sql file with a locked ("in use") table in it, that would be a great help.
     
  3. reficul

    reficul Member

    Joined:
    Dec 15, 2008
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Italy
    cPanel Access Level:
    Root Administrator
    have u fix this issue? I've the same problem...
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,456
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    If the DB was backed up properly it should be dropping the data if it exists as it's restoring the SQL. If you're trying to restore to an existing DB, try instead to restore to a new one.

    Restoring a database from shell would be best. Something like this should work.
    Upload the file to /home/user/backup/
    Create new database and user to be associated with it, then:
    mysql -u accountuser_databaseuser -p accountuser_dbname < /home/user/backup/myforums.sql
    Give it the password when asked.
     
Loading...

Share This Page