Your database contains all your important information if the database is erased or corrupted you lose everything.
Sometimes accident can happen when we least expert it. If you can have made a careless mistake and your database is gone how can you restore your data in your database?
So Backup your database regularly.
The WordPress backup files contain sensitive data, such as the WordPress administrator credentials. Such files should be stored in a secure location where other users do not have access to. You can also compress the WordPress backups into a password protected zip file so in case someone manages to get a copy of your WordPress backup files, he or she would need a password to access the content.
WordPress Database backup
Backup your WordPress database from CPanel
- Login to your hosting provider CPanel and click on the Backup icon in the Files section.
- Once in the backup options page, click on the WordPress database name listed under the section ‘Download a MySQL Database backup’.
- Once you click on the WordPress database name, a compressed SQL script file is automatically downloaded to your computer.
Store the WordPress database file in a secure place and ideally it should be stored on a different media.
Backup WordPress database using MySQL command line
If you host your own web server and have access to it via SSH or other protocol, you can make a database backup using a MySQL standard tool called mysqldump. As the name implies, the mysqldump tool dumps a MySQL database into a text file which can later be used to restore the WordPress database.
In the below example, we are using the MySQL root user to connect to the MySQL server, selecting the wpdatabase database and exporting it to a text file called wpdb_backup.sql.
Below is a breakdown of the switches and parameters used in the command:
-u is used to specify the username to connect to the MySQL server.
-p is used to specify a password. If no password is specified in the command line like in the above example, the MySQL server will prompt you to specify the password once you issue the command. For security reasons it is better not to specify the password via command line since it will be stored in the command line history.
Wpdatabasebk is the actual WordPress database name.
> This sign means export. It is used to specify where to export the MySQL server database dump.
Wpdb_backup.sql is the name of the file where the database dump will be stored. If the file does not exist it will be generated by the tool. Once the database is dumped into this file, download it to your computer and store it in a secure location, ideally on a separate media.
Backup WordPress database using phpMyAdmin
phpMyAdmin is a MySQL Server admin web based tool. This can be accessed directly via a specific URL or else from your hosting provider’s CPanel under the Databases section. To backup the WordPress database from the phpMyAdmin follow the below procedure:
- Once logged in to phpMyAdmin, depending on your installation you might notice that you have several databases. In that case, select the WordPress database by clicking on it.
- Once you select the WordPress database you are redirected to the database options page form where you can launch several database related tasks. As seen in the below screenshot, a list of tables in the database will also be populated. You might have more than 11 tables in your WordPress database, if you have WordPress plugins that store data in the WordPress database.
- Click on the Export option (highlighted in the above screenshot) to export/backup the WordPress database to a file. From the Export section, select Custom export and ensure that the below options are selected as highlighted in the below screenshot:
- All tables are highlighted.
- The option “Add Drop….” from the Object Creation options is enabled. This can be useful in case you are restoring the WordPress database onto an existing one.
Back up your website Using WordPress plugins
There are some limitation in default WordPress installation is backup.The included backup system limits you to exporting posts, pages, comments, custom fields, categories and tags. What you don’t get are backups of directories, files and databases.
There are plenty of plugins available to improve the WordPress database backup solution.
If you are use WordPress so you can use backup plugins for take database backup.
If You want to schedule a backup of your WordPress site database but do not have enough permissions to access your host then Install “wp database backup” plug-in.
WP-Database-Backup :When plugin is installed and active. you can backup your blog database easily in single click. Some time you have create database backup on your server or localhost and if some one hack your site or you have made some mistake then how can you recover your database which include important information. So it is important to save your database safer place like FTP, on your Email or Dropbox.
for more information about how to backup database using WP-database-Backup plugin check this link : http://walkeprashant.wordpress.com/wp-database-backup/