11 Ways to Take MySQL Database Backup

general 6361 Comments

MySQL is one of the most popular open source database management system for the development of interactive Websites. If you are using MySQL Databases in your websites then you definitely need to take the regular backups of your sensitive data to restore it later in case of any damage.

Here are 10+ ways to automatically or manually backup MySQL databases that you can adopt on the basis of your requirements, ease of use or permissions to access your server.

1. Backing Up With MySQLDump

In this article we’ll look at how to backup our databases using the mysqldump utility that comes with MySQL. Several examples will be reviewed using mysqldump, including the backup of your database to a file, another server, and even a compressed gzip file.

2. MySQL Export: How to Backup Your MySQL Database?

You can easily create a dump file(export/backup) of a database used by your account. In order to do so you should access the phpMyAdmin tool available in your cPanel.

3. Automatically Backup Mysql Database to Amazon S3

Many of users use Amazon S3 to backup their mysql databases. Here is an automated script which does this task of taking the backup of a mysql database and then moving it to the Amazon S3.

4. How to Backup MySQL Databases, Web Server Files to an FTP Server Automatically

This is a simple backup solution for people who run their own web server and MySQL server on a dedicated box or VPS. The main advantage of using FTP or NAS backup is a protection from data loss.First you will need to backup each database with mysqldump command, Automating tasks of backup with tar, Setup a cron job and generate FTP backup script.

5. How to E-Mail Yourself an Automatic Backup of Your MySQL Database Table with PHP

This script will send an e-mail to you with an .sql file attached, thus enabling you to back up specific tables easily. You could even set up an e-mail account just to receive these backups…

6. How to – Using PHP to Backup MySQL Database

Execute a database backup query from PHP file. To restore the backup you just need to run LOAD DATA INFILE query like this :

7. Backup Your Database Into an XML File Using PHP

This will show you a PHP snippet that outputs your database as XML. XML isn’t the easiest format to restore a table but it can be easier to read.

8. Backup Your MySQL Databases Automatically with AutoMySQLBackup

AutoMySQLBackup has some great features to: backup a single database, multiple databases, or all the databases on the server; each database is saved in a separate file that can be compressed (with gzip or bzip2); it will rotate the backups and not keep them filling your hard drive (as normal in the daily backup you will have only the last 7 days of backups, the weekly if enabled will have one for each week, etc.).

9. Backup MySQL Database Via SSH

A simple solution to backup your large MySQL databases through SSH. You will need to enable shell access inside your cPanel or Plesk control panel and use a utility such as PuTTY to log into your server via SSH.

10. How to Backup MySQL Database Automatically (For Linux Users)

This post will show you how to backup MySQL Database automatically if you are a linux user. You can use cron to backup your MySQL database automatically. "cron" is a time-based scheduling utility in Unix/Linux operating system.

11. Ubuntu Linux Backup MySQL Server Shell Script

If you have a dedicated VPS server running Ubuntu Linux. Here is how to backup all your MySQL server databases to your ftp server.

You are most welcome to suggest any additions to this list. You can use the comments box below to make any suggestions.

elegant themes banner

Related Articles:

You may be interested in:

Mike Smith writes for WebToolHub.com. He loves to golf, cook and explore music in his free time.

Would you like to contribute to this site? Get started »
Rate this article:
(4.0 rating from 1 votes)