Windows计划任务实现MYSQL冷备份
发布时间:2020-12-14 02:25:28 所属栏目:Windows 来源:网络整理
导读:BAT代码 @ECHO OFF for %%i in ( %0 ) do ( set "name=%%~ni") title %name% set targetsql="%~dp0firadio3324" mkdir %targetsql% 2 NUL ECHO ====== Start ======= SET config= --defaults-file=%~dp0my. ini --single-transaction "%~dp0..mysqldump.
BAT代码 @ECHO OFF for %%i in (%0) do (set "name=%%~ni") title %name% set targetsql="%~dp0firadio3324" mkdir %targetsql% 2>NUL ECHO ======Start======= SET config= --defaults-file=%~dp0my.ini --single-transaction "%~dp0..mysqldump.exe" %config% firadio_ucenter>%targetsql%firadio_ucenter-all.sql "%~dp0..mysqldump.exe" %config% firadio_yun_agent>%targetsql%firadio_yun_agent-all.sql "%~dp0..mysqldump.exe" %config% --no-data firadio_uc>%targetsql%firadio_uc-nodata.sql "%~dp0..mysqldump.exe" %config% --no-create-info --ignore-table=firadio_uc.uc_qq_msg_group --ignore-table=firadio_uc.uc_qq_msg_group_send --ignore-table=firadio_uc.uc_qq_msg_pri --ignore-table=firadio_uc.uc_qq_msg_pri_send --ignore-table=firadio_uc.uc_qq_base --ignore-table=firadio_uc.uc_session firadio_uc>%targetsql%firadio_uc-data.sql "%~dp0..mysqldump.exe" %config% --no-data firadio_yun>%targetsql%firadio_yun-nodata.sql "%~dp0..mysqldump.exe" %config% --no-create-info --ignore-table=firadio_yun.yun_ntuser_process_hour --ignore-table=firadio_yun.yun_ntuser_process_log --ignore-table=firadio_yun.yun_sensor_log --ignore-table=firadio_uc.yun_location_trace --ignore-table=firadio_uc.yun_ntuser_signin firadio_yun>%targetsql%firadio_yun-data.sql ECHO ======End======= set "Ymd=%date:~,4%%date:~5,2%%date:~8,2%" set h=%time:~0,2% set h=%h: =0% set "His=%h%%time:~3,2%%time:~6,2%" echo %Ymd%%His% mkdir "%~dp0xz" 2>NUL "%~dp0..7z.exe" a -ttar %targetsql%.tar %targetsql% "%~dp0..7z.exe" a -txz "%~dp0xz%Ymd%%His%.tar.xz" %targetsql%.tar ECHO ======Finish======= ? ? my.ini [mysql] host=mysql.vegan365.xyz port=3306 user=firadio password=******* default-character-set=utf8 [mysqldump] host=vps.firadio.net port=3324 user=adm-ro password=******** default-character-set=utf8 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- 从.NET转向Win32开发
- 在Windows上获取进程内存
- wpf – 无法通过setter设置System.Windows.Controls.MenuIt
- 在Windows Azure角色中OnStop()方法和Stopping事件之间有什
- windows-server-2008 – 仅使用1个程序运行RDP会话
- 如何设置win32 api c按钮背景颜色和文字颜色?
- Windows 7 – 如何在Windows 7任务调度程序中使用Messagebo
- 在Windows server 2019 Core 版本上安装SQL2016
- 一台windows电脑上搭建mysql主从数据库
- MSDOS“Hello World”EXE
推荐文章
站长推荐
- Microsoft Azure认知服务手写检测边界框参数
- windows-phone-8 – 为什么要警告Newtonsoft.Jso
- windows-7 – 用于查找用户自上次重启后是否已登
- 什么是命令行语法来创建Windows本地用户并将该用
- 软件将Windows通知事件日志发送到linux syslog服
- windows-server-2008-r2 – 集群故障转移和奇怪的
- 样式呈现的差异:Windows Server 2003到Windows
- windows putty Bitvise 登陆linux 服务器
- windows-phone-7 – ApplicationBar背后的背景图
- windows – ETS / Mnesia RAM表中的官方/建议/允
热点阅读