Hoaxblog.com

Everything is hoax!

Pages:

  • About

Categories:

  • Apache (6)
  • backup (1)
  • cache (2)
  • Cpanel/WHM (11)
  • ddos (1)
  • exam (1)
  • file hosting (2)
  • General (11)
  • Hosting (1)
  • It’s me (2)
  • linux (1)
  • Linux Shell (14)
  • Make Money Online (2)
  • Mysql (2)
  • mysqldump (1)
  • php (1)
  • Programming (3)
  • proxy (1)
  • Reseller (1)
  • SEO (1)
  • Servers (21)
  • VPN (1)
  • Windows (6)
  • wordpress (1)

Archives:

  • June 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • December 2007
  • October 2007
  • May 2007
  • April 2007

Blogroll

  • Free Rapidshare Downloads

Meta:

  • Register
  • Login
  • Valid XHTML
  • XFN
  • WordPress


Backing Up/Restoring Mysql Databases using SSH/Shell

This is really the most handy tool for mysql databases. A built in mysqldump can be used via shell to dump mysql databases within a few minutes. Sometimes dumping backups using phpmyadmin is too hazardous. So it’s really a necessary tool and fast too. I have listed this commands and i believe this should be useful to lots of system admins :)

Taking Database Backup

mysqldump -uuser -pmysqluserpassword database_name > database_name.sql

Restoring a Database

mysql -uuser -pmysqluserpassword database_name < database_name.sql

Here, you need to replace the user with the proper database user who has access to that specific database and the mysqluserpassword directs the password of that specific user. Here, one important thing is database_name.sql file can be replaced with the location of the sql file, suppose if you want to save it or retrieve from /home/backup then you can put /home/backup/database_name.sql to do that.

This entry was posted on Wednesday, February 27th, 2008 at 10:38 pm and is filed under Linux Shell, Cpanel/WHM, Servers, Mysql, backup, mysqldump. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply


© Copyright by Hoaxblog.com