10 Tutorials To Take MySQL Database Backup
MySQL is the most famous open source database management system for the development of interactive Websites. If you use MySQL Databases in your websites then you should always make backup of your data regularly to recover it in case of loss.
Here are 10 methods to automatically or manually backup MySQL databases. Check them out and pick the one which is best suited to you.
1. Backing Up Using MySQLDump
Backup of data can be made using mysqldump utility that comes with MySQL. Various examples are given using mysqldump, including the backing up your database to a file, another server, and even a compressed gzip file.
You can backup by making a dump file (export / backup) of a database used by your account. To do so you have to head over to phpMyAdmin tool in your cPanel.
You can also use Amazon S3 to backup your mysql databases. An automated script is present here, which takes backup of a mysql database and then moves it to Amazon S3.
It is an easy way to backup data for users who run their own web server and MySQL server on a dedicated box or VPS. The best thing when using FTP or NAS backup is the fact that your data is secure. First of all you have to backup every single database with mysqldump command, Automating tasks of backup with tar, Setup a cron job and create FTP backup script.
It will deliver an e-mail to you with an .sql file attached, which lets you to back up particular tables easily. You can even create an e-mail account specifically to get these backup.
Carry out a database backup query from PHP file. In order to restore the backup all you have to do is to run LOAD DATA INFILE query.
It will display a PHP snippet that outputs your database as XML. XML is not one of the easiest format to restore a table but it is definitely easier to read.
SSH can be used to backup large MySQL data. You will have to enable shell access in your cPanel or Plesk control panel and utilize a tool like PuTTY to log into your server through SSH.
If you are a Linux user you can backup MySQL Database automatically by using cron. “cron” is a time-based scheduling utility in Unix/Linux OS.
You can backup all your MySQL server databases to your ftp server, if you have a dedicated VPS server with Ubuntu Linux.
You are welcome to share any more methods in comments below.