salt上编写了备份日志的脚本
生活随笔
收集整理的這篇文章主要介紹了
salt上编写了备份日志的脚本
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
我在salt上編寫了備份日志的腳本,在/opt/CardServer下的主程序目錄只保留當天的日志,/opt/log_del目錄會保存7天的日志。
salt?* state.sls script.log_sevenday
#添加計劃任務
salt?* cron.set_job root '00' '4' '*/1' '*' '*'? '/usr/bin/python /opt/script/del_log.py' 'backup /opt/CardServer/*/*.log-->/opt/log_del/'
#查看計劃任務
salt?* cron.ls root
轉載于:https://www.cnblogs.com/liuyoushui/p/7121588.html
總結
以上是生活随笔為你收集整理的salt上编写了备份日志的脚本的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 思科超融合:主推HyperFlex,押注
- 下一篇: LENOVO 充到60%就会停止充电