ÓÐÈË˵£¬¹ýÄê·Å¼ÙÈç¹ûûÈ˱¸·ÝÊý¾Ý¿âÔõô°ì£¬ÐÄÀïÏëÕâȷʵÊǸöÍ·ÌÛµÄÎÊÌâ¡£ÓÚÊÇÏëÁËÒ»¸ö°ì·¨£¬¸É´àдһ¸öС½Å±¾ÈÃÿÌìmysql×Ô¶¯±¸·ÝºÃÁË¡£ ÆäʵÕâ¸ömysql×Ô¶¯±¸·ÝµÄС½Å±¾·Ç³£¼òµ¥£¬ÏÂÃæ
#!/bin/sh # File: autoback.sh # Database info DB_NAME="Êý¾Ý¿â" DB_USER="Êý¾Ý¿âÓû§Ãû" DB_PASS="Êý¾Ý¿âÃÜÂë" # Others vars BIN_DIR="mysql°²×°Ä¿Â¼" BCK_DIR="±¸·ÝĿ¼" DATE=`date +%Y%m%d` # TODO $BIN_DIR/mysqldump --opt -u$DB_USER -p$DB_PASS $DB_NAME | gzip > $BCK_DIR/$DB_NAME_$DATE.gz±£´æÍ˳ö£¬È»ºó°ÑÕâ¸öÎļþ¸³Óè¿ÉÖ´ÐеÄȨÏÞ£º
#chmod 777 mysqlautobackup.shÈ»ºó±à¼crontab£º
#vi /etc/crontab
»òÕß
#crontab -e
ÔÚ×îºóÒ»ÐмÓÈëÒÔÏÂÄÚÈÝ£º
01 5 * * * root /www/mysqlautobackup.sh
È»ºóÖØÆôÒ»ÏÂcrontab£º
# /etc/rc.d/init.d/crond restart
ÕâÑù¾Í¸ã¶¨ÁË£¬ÒÔºóÿÌìÁÙ³¿µÄ5µã¾Í»á×Ô¶¯Ö´ÐÐÒ»´Îmysql×Ô¶¯±¸·ÝµÄÃüÁî¡£
ÍƼöÐÅÏ¢
- linuxÃüÁîѧϰ±Ê¼Ç£¨11£©£ºnlÃüÁî
- linuxÃüÁîѧϰ±Ê¼Ç£¨5£©£ºrmÃüÁî
- linuxÃüÁîѧϰ±Ê¼Ç£¨4£©£ºmkdirÃüÁî
- linuxÃüÁîѧϰ±Ê¼Ç£¨1£©£ºlsÃüÁî
- ½«CentosµÄyumÔ´¸ü»»Îª¹úÄڵİ¢ÀïÔÆÔ´
- ʹÓÃNginxÌí¼Óheader·ÀÖ¹ÍøÒ³±»frame
- linuxϼÓËÙscp´«Êä´óÎļþµÄËÙ¶È
- linuxϵͳÉ϶ÔnginxÈÕÖ¾·Ö¸î´¦Àí
- lnmp/nginxϵͳÕæÕýÓÐЧµÄͼƬ·ÀµÁÁ´ÍêÕûÉèÖÃÏê½â
- Í»ÆÆÊ®Íò²¢·¢µÄNginxµÄÅäÖü°ÓÅ»¯
ÈÈÃÅÐÅÏ¢
- nohup: redirecting stderr to stdou....
- ʹÓÃlog_formatΪNginx·þÎñÆ÷ÉèÖøüÏêϸµÄÈÕÖ¾¸ñʽ
- jquery easyUI--dataGrid-Json
- [Ô´´]·ÂGoogle Reader¡¢ÐÂÀË΢²©¡¢ÌÚѶ΢²©µ....
- ÀûÓÃKeepalived+mysql¹¹½¨¸ß¿ÉÓÃMySQLË«Ö÷×Ô¶....
- Nginx+keepalivedʵÏÖ¸ºÔؾùºâºÍË«»úÈȱ¸¸ß¿ÉÓÃ
- jqueryʵÏÖÒ³Ãæ¼ÓÔؽø¶ÈÌõ
- Rolling cURL: PHP²¢·¢×î¼Ñʵ¼ù
- codeigniter ·ÓÉÖÕ¼«ÓÅ»¯(url rewrite)
- linuxÏÂÉèÖÃsshÎÞÃÜÂëµÇ¼
×î½ü¸üÐÂ
- ²éÕÒ²¢É¾³ý.svnĿ¼Îļþ
- redis ÆßÖÖÊý¾ÝÀàÐ͵ÄʹÓó¡¾°
- linux ÏÂÎļþ¸´ÖƵ½windowsÏÂÂÒÂëµÄ½â¾ö°ì·¨
- nginx³öÏÖ502 upstream sent too big he....
- linuxÏÂsudoÅäÖÃÏê½â
- linuxÃüÁîѧϰ±Ê¼Ç£¨15£©£ºtailÃüÁî
- linuxÃüÁîѧϰ±Ê¼Ç£¨14£©£ºheadÃüÁî
- linuxÃüÁîѧϰ±Ê¼Ç£¨13£©£ºlessÃüÁî
- linuxÃüÁîѧϰ±Ê¼Ç£¨12£©£ºmoreÃüÁî
- ¼ÓÃÜËã·¨±È½Ï3DES AES RSA ECC MD5 SHA1µÈ
ÆÀÂÛ