Feeds:
文章
评论

Posts Tagged ‘原创’

The script will keep requesting a status page (can be any page served by the application server), if the request timed out or error occurs, it will try to restart application server, if restart failed few times, it will stop trying and send you an alert email.
To run it: nohup ./sitechk.pl &
Note:  use it at [...]

Read Full Post »

适用于小型网站或开发环境的数据库备份,其他场合请考虑用mysqlhotcopy或其他被推荐的方案(如:master/slave)

#!/bin/bash
cd /home/hugo/bin/backup
eval $(date "+MABB=’%B’ WEEK=’%u’ DAY=’%d’ MON=’%m’ YEAR=’%Y’")
case $WEEK in
1)
OUT=1
;;
2)
OUT=2
;;
3)
OUT=3
;;
4)
OUT=4
;;
5)
OUT=5
;;
6)
OUT=6
;;
7)
OUT=7
;;
*)
OUT=0
;;
esac
/usr/bin/mysqldump -uroot –all-database > fullbackup$OUT.sql

Read Full Post »