#!/bin/sh
date=`date +%Y-%m-%d`
#backup cacti
tar -czvf /backup/"$date".cacti.tar.gz /srv/www/htdocs/cacti
yes | mysqldump -uroot -pnovellTW -l --add-drop-table cacti > /backup/"$date".mysql.cacti
#backup nagios
tar -czvf /backup/"$date".nagios-cfg.tar.gz /etc/nagios
tar -czvf /backup/"$date".nagios-web.tar.gz /usr/share/nagios
#yes | mysqldump -uroot -pnovellTW -l --add-drop-table nagios > /backup/"$date".mysql.nagios
沒有留言:
張貼留言