First we wrote a a.bat processing file, the code is as follows
The code is as follows |
Copy Code |
net stop MySQL xcopy D:phpstudymysqldataabc*.* d:up%date:~0,10%/y net start MySQL |
NOTE: ABC is the name of your database, up is the name you want to back up to the specified directory, then date reference is your build directory date, such as up/2013-03-06.
Now we have written the batch file and started to plan the task.
1, in You: Windows "start-> program-> attachment-> System Tool" found it, open the Scheduled Tasks window
2, find your A.bat file path.
3, the following can choose the execution cycle, here we choose every day.
4, and then enter a specific point of time, can be accurate to the minute, there will be an input computer login password, we try to input, otherwise it will not be a successful backup Oh, I did not enter the password is not backed up.
5, the final finish on Ko.