Search tutorial by keyword

How to take backups & restore backups in MySQL server

 

In this post we will discuss how to take and restore backups of MySQL database.

You can load a dump back into a database also

Take dump of the database by the following command

#mysqldump -u(username) -p(password) (databasename) > cacti.sql

Here cacti.sql is the backup file which will be the backup of my database 

Now if you want to restore the database you have to first make a database then load this file into the newly made database 

#mysql -u(username) -p(password)

> create database cacti;

>quit

Now a database named cacti is created and you can restore the dump by the following command

mysql -u(username) -p(password) cacti < cacti.sql

If you want just the structure dump of a database then following command will be used

#mysqldump -u(username) -p(password)  --no-data (databasename) > cacti.sql

*Here cacti is the newly created database in which we have loaded the backup dump

Michael Dudli

Cloud Specialist with more than 10 years experience in the Hosting Business.

Website: www.cloudserver24.com

26509 comments

  • Agencia detectives Madrid
    Agencia detectives Madrid Sonntag, 22. Oktober 2017 15:03 Comment Link

    Hey are using Wordpress for your site platform? I'm new to the blog world but I'm trying to get started and set up my own. Do you need any html coding expertise to make your
    own blog? Any help would be greatly appreciated!

  • Thaddeus Hesson
    Thaddeus Hesson Sonntag, 22. Oktober 2017 14:50 Comment Link

    When I originally commented I clicked the "Notify me when new comments are added" checkbox and now each time a comment is added I get three e-mails with the same comment. Is there any way you can remove me from that service? Cheers!

  • سئو ارزان
    سئو ارزان Sonntag, 22. Oktober 2017 14:50 Comment Link

    Good day! Do you use Twitter? I'd like to follow you
    if that would be okay. I'm definitely enjoying your blog and look forward to new posts.

  • Rigoberto Lather
    Rigoberto Lather Sonntag, 22. Oktober 2017 14:50 Comment Link

    I know this if off topic but I'm looking into starting my own blog and was wondering what all is required to get setup? I'm assuming having a blog like yours would cost a pretty penny? I'm not very web smart so I'm not 100 positive. Any suggestions or advice would be greatly appreciated. Thank you

  • Ja Chrystal
    Ja Chrystal Sonntag, 22. Oktober 2017 14:50 Comment Link

    Unquestionably consider that which you said. Your favourite justification seemed to be at the web the easiest factor to remember of. I say to you, I definitely get annoyed while other people consider issues that they plainly don't understand about. You managed to hit the nail upon the top and also defined out the entire thing without having side-effects , folks can take a signal. Will likely be again to get more. Thanks

  • Hiedi Manheim
    Hiedi Manheim Sonntag, 22. Oktober 2017 14:50 Comment Link

    I and my buddies came looking through the nice pointers from your web page and then then got a terrible suspicion I never expressed respect to the web blog owner for those tips. The young boys came for that reason warmed to learn all of them and have now truly been having fun with these things. Appreciate your really being very accommodating as well as for picking out variety of impressive subject areas millions of individuals are really desirous to be aware of. Our own honest regret for not expressing appreciation to you earlier.

  • Megan Trokey
    Megan Trokey Sonntag, 22. Oktober 2017 14:50 Comment Link

    Wow, superb blog structure! How long have you been running a blog for? you make running a blog glance easy. The whole glance of your web site is wonderful, as well as the content!

  • Elton Praml
    Elton Praml Sonntag, 22. Oktober 2017 14:50 Comment Link

    It’s really a nice and useful piece of info. I am satisfied that you simply shared this useful info with us. Please stay us informed like this. Thank you for sharing.

  • Chad Hibben
    Chad Hibben Sonntag, 22. Oktober 2017 14:49 Comment Link

    Thank you, I have just been looking for info about this subject for ages and yours is the best I have discovered so far. But, what about the bottom line? Are you sure about the source?

  • Johnnie Lienke
    Johnnie Lienke Sonntag, 22. Oktober 2017 14:49 Comment Link

    There is perceptibly a bundle to identify about this. I feel you made various nice points in features also.

Leave a comment

Make sure you enter all the required information, indicated by an asterisk (*). HTML code is not allowed.

Kontakt

Verkauf

sales@cloudserver24.com

Support

support@cloudserver24.com