灌溉梦想,记录脚步
标签类目:shell

linux/centos cacti备份及恢复shell

备份及恢复Cacti
(1)cacti的文件目录的备份(rra目录除外)
(2)mysql备份
mysqldump -p cacti >/tmp/cacti.sql
(3)备份rra
dumprrd.sh

#!/bin/sh
rrddump=”/usr/local/bin/rrdtool dump”
xmldir=”/tmp/mysqlbackup/rraxml”
xmlbackup=”/tmp/mysqlbackup/rrabak”
mysqlbackupDIR=”/tmp/mysqlbackup”
rrdpath=”/usr/local/share/cacti/rra/”
DATE=`date +”%y-%m-%d”`
if [ ! -e {xmldir}
继续阅读 »