How to automate Mysql database backup

In this guide I will show you how you can automate the backup process of Mysql database using a simple trick in Windows. This is the Windows equivalent of the Cron jobs that are mostly used in Linux systems.

I’m using Windows 7 at the time of this writing but the process is still the same for Windows XP and Windows Vista.

Before we start, you must have already a knowledge on how to backup mysql database using mysqldump the built-in tool for mysql which I mainly use for backups.

Here’s the link to the last tutorial that I have made which discusses about the ways on how to backup mysql database. You might want to check it out first if you don’t have an idea on how to use mysqldump utility.

Lets begin by opening up the task scheduler

image

From this screen, you need to click on create basic task

image

Input the name of the task together with the description then click next

image

In this case I selected when I log on. You can choose whatever you want. Then click on next again.

image

We will select start a program here since we will be executing a batch file. A batch file is similar to an executable file. And you can convert a batch file to an executable easily. Click next again.

image

Browse for the batch file that backups mysql database or just enter its location on the input box provided. Then click next.

image

Just click on finish when you see this screen. Its just a summary of what the task will do.

image

To check if it is really saved then just scroll down to the active task section and try to find the name of the task in the list. Or just press on your keyboard the first letter of the task name. In my case, it is ‘D’ for db backup

image

 

Conclusion

That’s a nice and easy way on how to do mysql database backups automatically using the built in windows tool, the task scheduler. You can also try to be creative by doing some other task with this neat windows tool.

3 thoughts on “How to automate Mysql database backup

  1. Pingback: Assoc of keyboard ninja forum « Data Integrated Entity

  2. Pingback: Automatically backup mysql database using a batch file « Data Integrated Entity

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s