美文网首页
openvswitch日志定时切割备份

openvswitch日志定时切割备份

作者: 杀破魂 | 来源:发表于2018-08-30 11:26 被阅读6次
/var/log/openvswitch/*.log {
    daily
    compress
    sharedscripts
    create 640 root adm
    missingok # 在日志轮循期间,任何错误将被忽略
    rotate 6  #保留6个备份
    postrotate #打开新的日志文件
        if [ -d /var/run/openvswitch ]; then
            for ctl in /var/run/openvswitch/*.ctl; do
                ovs-appctl -t "$ctl" vlog/reopen 2>/dev/null || :
            done
        fi
    endscript
}

相关文章

网友评论

      本文标题:openvswitch日志定时切割备份

      本文链接:https://www.haomeiwen.com/subject/prerwftx.html