Xingwai technology automatically backs up SQL2000/MySQL tools every day

Source: Internet
Author: User

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.

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.