久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      全網(wǎng)備份項目解決方案實例

      大規(guī)模集群全網(wǎng)備份案例

      項目要求:
      1、需要備份的文件或目錄有(原則上,只要是運(yùn)維人員寫入或更改的數(shù)據(jù),都需要備份):
      /var/spool/cron/root /etc./rc.local /etc/sysconfig/iptables /var/www/html /app/logs
      2、為了規(guī)范化,每臺web服務(wù)器進(jìn)行本地備份時都本分到/backup目錄下
      3、每臺web服務(wù)器進(jìn)行本地備份時,都備份到backup下以本機(jī)IP地址命名的目錄中
      4、打的tar包文件名中需要包含執(zhí)行當(dāng)天的日期
      5、統(tǒng)一備份數(shù)據(jù)的服務(wù)器通過rsync daemon方式提供存儲備份數(shù)據(jù)的目錄/backup
      6、由于web服務(wù)器本地存儲空間有限,需要將超過7天的備份數(shù)據(jù)刪除
      7、為了方便的知道每次備份是否成功 我們需要做如下操作:
      a.在每臺web服務(wù)器上檢查備份是否成功
      b.在存儲備份數(shù)據(jù)的服務(wù)器上檢查備份數(shù)據(jù)是否推送成功,并發(fā)送郵件至管理員郵箱
      8由于備份服務(wù)器空間有限 需要刪除超過180天的備份數(shù)據(jù),但每周六的備份數(shù)據(jù)需要永久保存

      客戶端上的配置:

      #vim bak.sh
      #!/bin/bash
      IP=$(ifconfig eth1|awk -F "[ :]+" 'NR==2 {print $4}')
      Path=/backup
      if [ $(date +%w) -eq 0 ]
      then
      Time="week$(date +%F%w -d "-1day")"
      else
      Time=$(date +%F -d "-1day")
      fi
      mkdir $Path/$IP/ -p

      cd / &&
      tar zcfh $Path/$IP/backup$Time.tar.gz var/spool/cron/root etc/rc.local etc/sysconfig/iptables var/www/html app/logs server/scripts &&
      md5sum $Path/$IP/backup
      $Time.tar.gz >$Path/$IP/flag_$Time.log &&
      rsync -az $Path/ rsync_backup@172.16.1.41::backup –password-file=/etc/rsync.password &&
      find /backup/ -type f -mtime +7 ( -name ".log" -o -name ".tar.gz" ) |xargs rm -f

      #crontab -e
      00 00 * /bin/sh bak.sh > /dev/null

      備份服務(wù)器上的配置
      #vim baf.sh
      #!/bin/bash
      IP=$(ifconfig eth1|awk -F "[ :]+" 'NR==2 {print $4}')
      Path=/backup
      if [ $(date +%w) -eq 0 ]
      then
      Time="week$(date +%F%w -d "-1day")"
      else
      Time=$(date +%F -d "-1day")
      fi
      LANG=en
      find /backup -type f -name "${Time}.log"|xargs md5sum -c >>$Path/${Time}_result.log 2>&1
      mail -s "$Time bak result" oldboytraining@163.com <$Path/${Time}_result.log
      find /backup/ -type f -mtime +180 ! -name "week_6*" |xargs rm -f

      #crontab -e
      00 00 * /bin/sh baf.sh > /dev/null

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號