Home > Database > Mysql Tutorial > CentOS6定时自动备份MySQL/SVN_MySQL

CentOS6定时自动备份MySQL/SVN_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-01 13:37:42
Original
986 people have browsed it

CentOS6CentOSSVNcentos

bitsCN.com


CentOS6定时自动备份MySQL/SVN

 

vim /data/backup.sh:  

rq=` date +%Y%m%d%H%M%S`

mysqldump testdb1 -uroot -proot > /data/backup/testdb1_$rq.sql

mysqldump testdb1 -uroot -proot > /data/backup/testdb2_$rq.sql

svnadmin dump /data/svnrepos/project1 |gzip  > /data/backup/project1_$rq.dump.tar.gz

每年每月每日0时1分以root身份执行备份shell脚本

 

vim /etc/crontab: 

 

01 0 * * * root /data/backup.sh
 

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