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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

    Aug 21, 2003
    Likes Received:
    Trophy Points:
    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
  2. hzJayJ

    hzJayJ Well-Known Member

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

    mysql database_name < database_name.sql

Share This Page