人在江湖

  BlogJava :: 首页 :: 联系 :: 聚合  :: 管理
  82 Posts :: 10 Stories :: 169 Comments :: 0 Trackbacks

连抄带改了一个,记录下来

@echo off
set errorlevel=0
set dump_command="C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqldump"

set db_bbs=bbscs8
set db_bug=jtrac
set db_wiki=wiki

set backup_dir=U:\bak\mysql\
set timestamp=%date:~,4%%date:~5,2%%date:~8,2%_%time:~0,2%-%time:~3,2%-%time:~6,2%

set backup_bbs_file=%backup_dir%%db_bbs%_backup_%timestamp%.sql
set backup_bug_file=%backup_dir%%db_bug%_backup_%timestamp%.sql
set backup_wiki_file=%backup_dir%%db_wiki%_backup_%timestamp%.sql

set user_mysql=root
set password_mysql=virtual

echo backup mysql database:%db_bbs%
%dump_command% -u%user_mysql% -p%password_mysql% %db_bbs% > %backup_bbs_file%

echo backup mysql database:%db_bug%
%dump_command% -u%user_mysql% -p%password_mysql% %db_bug% > %backup_bug_file%

echo backup mysql database:%db_wiki%
%dump_command% -u%user_mysql% -p%password_mysql% %db_wiki% > %backup_wiki_file%

echo end backup

posted on 2011-01-30 18:21 人在江湖 阅读(816) 评论(0)  编辑  收藏 所属分类: others

只有注册用户登录后才能发表评论。


网站导航: