Sql2000/mysql Automatic Backup code

Source: Internet
Author: User

Place the following file in the System32 directory,
Then, open it with a note.
Backupsql.bat
will be inside the
"The location of the data directory for the e:sql2000 database *.*"
Change to your own SQL2000 data directory, such as
"E:program FilesMicrosoft SQL servermssqldata*.*"
And then the inside of the
"The location of the data directory for the E:mysql database *.*"
Change to your own MySQL data directory, such as:
"E:program filesmysqlmysql Server 5.0data*.*"
After saving,
You can schedule tasks in the Control Panel on the server,
Add a scheduled task, call this backupsql.bat to run a scheduled backup. The files generated by the backup are saved by default in E disk, and you can modify the location by modifying the Backupsql.bat.


@echo off
C:
CD "C:Program Fileswinrar"
net stop MSSQLServer
Winrar.exe a-ag "-[yyyy-mm-dd-hh-mm-ss]"-k-r-s-ibck-inul "e:sql2000 backup generated files. rar" "e:sql2000 location of the data directory in the database *.*"
NET start MSSQLServer
net stop Mysql
Winrar.exe a-ag "-[yyyy-mm-dd-hh-mm-ss]"-k-r-s-ibck-inul "E:mysql backup generated files. rar" "E:mysql location of the data directory in the database *.*"
net start Mysql

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.