Home > Database > Mysql Tutorial > 使用批处理实现mysql的数据库备份与上传_MySQL

使用批处理实现mysql的数据库备份与上传_MySQL

WBOY
Release: 2016-06-01 13:50:18
Original
1103 people have browsed it

bitsCN.com     有一台windows服务器上跑着mysql的一些应用,现在需要将mysql的数据每天备份,并通过ftp上传到指定的存储服务器上
 
要是在linux上,shell 脚本很容易就搞定了,在windows上习惯了点鼠标,哪里来的脚本,一时还真不知道该怎么弄.baidu,google得知可以通过批处理或者vbs脚本实现.
 
批处理是比较简单的,毕竟dos的常用命令还是知道的
 
解决思路:
使用批处理文件,实现备份和上传的功能
将批处理文件加到计划任务中实现每日定时执行脚本
 
完整的批处理文件如下 文件名dbbk.bat
@echo off
:: this batch is to backup the db files on windows to linux server
:: created by yahoon
:: 2008.4.9
 
::backup the mysql db
mysqldump -uroot

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template