Full-ready batch processing under win
Batch processing is used for game servers, rigorously tested, and formally used, primarily for full backup of the database, of course. It's just a backup of the numbers.
, as to how to transfer the data back-up remote server can invoke the FTP function, this script is not detailed, do not understand
Can leave a message or email to [email protected]
Code to copy code as follows
@echo off
@echo ###################################################################
@echo # RAR backup script to backups.
@echo # BACKUP for Mysql City to City (WINDOWS)
@echo # [email protected]
@echo ###################################################################
Set Path=c:\ "program Files" \winrar;%path%
Set Mysqlpath=c:\ "program Files" \mysql\ "MySQL Server 5.0"
Set Bakpath=e:\mysql_bak
Set Username=root
Set password=1234567890
REM Note Select the backup mode and block other unwanted (with REM on the front)
REM Backup using Mysqldump method
Code to copy code as follows
mkdir%bakpath%\data
%mysqlpath%\bin\mysqldump-u%username%-p%password%--single-transaction--default-
Character-set=utf8--flush-logs--master-data=2--delete-master-logs spirit_beast >%
Bakpath%\data\spirit_beast%date:~0,10%.sql
%mysqlpath%\bin\mysqldump-u%username%-p%password%--single-transaction--default-
Character-set=utf8--flush-logs--master-data=2--delete-master-logs quartz_event >%
Bakpath%\data\quartz_event%date:~0,10%.sql
RAR a-ag%bakpath%\full\%b (www.111cn.net) akpath%\data\*.sql
RMDIR/S/q%bakpath%\data\
@echo%date%%time% full bakup finish >> C:/mysqlbakup.log
Incremental backup batch under win
This batch is used for game servers, rigorously tested, and formally used, primarily for full incremental backup of the database, of course. If you want to use this
function will also need to open the MySQL data binlog function, otherwise you will not be able to make incremental backup, it is necessary, this is just the number of backup
Out, as to how the backup data can be transferred remotely on the remote server to invoke the functionality of FTP, this script is not detailed, not
Understand can leave a message, or mail to [email protected]
Code copy Code as follows
@echo off
@echo ###################################################################
@echo # RAR backup script to backups.
@echo # BACKUP for Mysql City to City (WINDOWS)
@echo # [email protected]
@echo ########################## #########################################
Set path=c:\ "program Files" \winrar;%path%
Set Mysqlpath=c:\ " Program Files "\mysql\" MySQL Server 5.0 "
Set Bakpath=e:\mysql_bak
Set Username=root
Set password=1234567890
REM Note Select the Backup method to block other unwanted (before REM)
Rem backup using mysqldump
mkdir%bakpath%\data
%mysqlpath% \bin\mysqladmin-u%username%-p%password% flush-logs
xcopy/e/c/h/y%mysqlpath%\data\mysql-bin.*%bakpath%\data
rar a-ag%bakpath%\diff\%bakpath%\data\mysql-bin.*
rmdir/s/q%bakpath%\data\
@echo%date%%time% dIncr Emental bakup finish >> c:/mysqlbakup.log
When we do this, we can just add a scheduled task to Windows to implement a scheduled backup.
From:http://www.111cn.net/database/mysql/53739.htm
MySQL incremental backup and full backup batch under Windows