@echo offe
set date=%date:~0,4%-%date:~5,2%-%date:~8,2%
mysqldump -uroot -p123456 A B>D:\bak\"%date%".sql
rar.exe a -k -r -s -ml D:\bak\"%date%".sql.rar D:\bak:\"%date%".sql
del D:\bak:\*.sql
rar.exe a -k -r -s -ml D:\bak\"%date%"htdocs.rar D:\bak:\"%date%"htdocs