Home > Database > Mysql Tutorial > body text

windows下备份mysql和网站的脚本_MySQL

WBOY
Release: 2016-06-01 13:38:52
Original
1031 people have browsed it

bitsCN.com


windows下备份mysql和网站的脚本

 

最近使用的一个windows下的数据库和网站备份脚本:

   

set today=%date:~0,4%-%date:~5,2%-%date:~8,2%

for /f  %%i in ('dir d:/wamp/bin/mysql/mysql5.5.20/data /ad /b ') do d:/wamp/bin/mysql/mysql5.5.20/bin/mysqldump.exe -u root -proot %%i >d:/wamp/sql/%%i.sql

net stop wampapache

net stop wampmysqld

7z.exe a -tzip d:/wamp.backup/%today%-wamp.zip d:/wamp/ -mx0 -xr!u_mtc -xr!6027 >d:/wamp.backup/%today%-wamp.log

net start wampmysqld

net start wampapache

del /q d:/wamp/sql/*
 

bitsCN.com
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