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

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

    hzJayJ Well-Known Member

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

    mysql database_name < database_name.sql
     
Loading...

Share This Page