Best practices for MySQL automatic backup under Windows

Source: Internet
Author: User
Keywords MySQL

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

There are many online Windows MySQL automatic backup method, in fact, there are some bad places and problems, now summed up a best way for everyone to refer to:

Create a new Notepad and rename it to: Mysql_backup.bat then right-click to select Edit, paste the following section in and modify the save, such as I want to back up Taobao this database, the script is as follows:

net stop MySQL

xcopy D:\mysql\data\taobao\*.* d:\db_backup\%date:~0,10%\ y

net start MySQL

Above the D disk and Db_backup, and other directories can be modified, the script means to copy Taobao this directory to D disk db_backup This directory inside the directory of the name of the day, such as: d:\backup\2010-05-23\, please note that, Many people on the Internet reprinted the said to%date:~4,10% this as the day directory is wrong.

Then create a new scheduled task, the Mysql_backup.bat to join in, set for a few hours a day after the operation of the line, this part no longer detailed, we do not understand, please contact me q:154992172, my website Taobao Women's Shopping guide net http:// Www.taobao-daogou.org Use this method to back up the large capacity MySQL database is always the case, basically no problem.

Another approach is to back up the database with MySQL mysqldump. sql file, this method is the disadvantage of the database is small, but the database is slightly larger, such as more than 1g, especially slow, and super memory, speed is definitely slower than the copy file, and in the backup when the database is still inaccessible , this is not as good as the way I gave it.

The above method only has the server control right or the VPS effective, the virtual host can only use phpMyAdmin or the imperial backup King to back up.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.