Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to backup MySQL database on Windows?

I have WampServer 2.0 that is installed on Windows on my laptop.

I'm running on it an application that I wrote. The application is working with MySQL database.

I would like to make backups of this database periodically.

How this can be done ?

How could I define cron on Windows ?

like image 581
Misha Moroshko Avatar asked Sep 29 '10 15:09

Misha Moroshko


People also ask

What is the best way to backup MySQL database?

To back up a MySQL database, you can use either third-party tools or execute the mysqldump command from the command line. mysqldump is a command-line utility used to generate a MySQL logical database backup. It creates a single . sql file that contains a set of SQL statements.

How do you backup and restore MySQL database in Windows?

In Database Explorer, right-click the database and select Backup and Restore > Backup Database. In the Database Backup Wizard, select the database, specify a path to the backup file, and enter the name of the output file.


1 Answers

The rough equivalent of crontab -e for Windows is the at command, as in:

at 22:00 /every:M,T,W,Th,F C:\path\to\mysql\bin\mysqldump.exe ...

Running the at command by itself lists the tasks you've created using at.

The mysqldump documentation is here.

like image 135
RichieHindle Avatar answered Oct 04 '22 05:10

RichieHindle