Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Restore ONLY a MySQL db without restoring anything else?

Discussion in 'Data Protection' started by sneader, Feb 20, 2009.

  1. sneader

    sneader Well-Known Member

    Joined:
    Aug 21, 2003
    Messages:
    1,154
    Likes Received:
    38
    Trophy Points:
    178
    Location:
    La Crosse, WI
    cPanel Access Level:
    Root Administrator
    I have a customer that deleted a MySQL db from cPanel, by accident. They would like that db restored from the daily backup, but they don't want the rest of their directory overwritten or mail overwritten.

    In the "Restore Backup" in WHM, you can uncheck "restore mail config" which I believe will leave e-mail untouched. And you can check/uncheck Restore MySQL dbs if you want to control whether MySQL dbs are restored.... but is there any way to just do the MySQL dbs without restoring anything else?

    Also, for future reference, is there a way to restore only a SINGLE MySQL db, without restoring ALL dbs?

    - Scott
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. hzJayJ

    hzJayJ Well-Known Member

    Joined:
    Nov 14, 2008
    Messages:
    76
    Likes Received:
    1
    Trophy Points:
    58
    You can run the command to restore the database from the backup sql file through the shell

    mysql database_name < database_name.sql
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice