CopyCode The Code is as follows: @ echo off
C:
Cd "C: \ Program Files \ WinRAR"
Net stop MSSQLServer
Winrar.exe A-Ag "-[YYYY-MM-DD-HH-MM-SS]"-K-r-s-ibck-inul "E: \ sql20001_generated file .rar" "E: \ SQL2000 database data directory \*. *"
Net start MSSQLServer
Net stop MySQL
Winrar.exe A-Ag "-[YYYY-MM-DD-HH-MM-SS]"-K-r-s-ibck-inul "E: \ mysql generated file .rar" "E: \ location of the Data Directory of the MySQL database \*. *"
Net start MySQL
Put the above files in the System32 directory,
Then, use the notebook to open
Backupsql. bat
Replace
"E: \ SQL2000 location of the Data Directory of the database \*.*"
Change to your own SQL2000 data directory, as shown in figure
"E: \ Program Files \ Microsoft SQL Server \ MSSQL \ data \*.*"
Then
"E: \ location of the Data Directory of the MySQL database \*.*"
Change to your MySQL data directory, for example:
"E: \ Program Files \ mysql \ MySQL Server 5.0 \ data \*.*"
After saving,
On the Control Panel of the server, you can schedule tasks,
After you add a scheduled task and call backupsql. BAT to run the task, you can implement scheduled backup. By default, the files generated by the backup are saved on the edisk. You can modify backupsql. BAT to modify the location.