linux logrotate备份日志
来源:互联网 发布:海森伯格矩阵的用途 编辑:程序博客网 时间:2024/06/10 01:41
linux中的日志很重要,以后机器有问题时候作为解决问题的依据
在linux中使用logrotate设置规则进行备份
在/etc/logrotate.d 目录下建文件,然后设置规则
/root/logs/out.log/root/logs/err.log/root/dclogs/out.log/root/dclogs/err.log{ daily --每天备份 compress --压缩 rotate 7 --保留7份备份 dateext --在备份文件后加时间后缀 ifempty --空文件也备份 noolddir --备份到同目录下 copytruncate --先copy文件内容备份,然后清空内容}
测试建立的备份规则:
logrotate -vf /etc/logrotate.d/logname
参考文章:
http://blog.csdn.net/cjwid/article/details/1690101
https://linux.cn/article-4126-1.html
阅读全文
0 0
- linux logrotate备份日志
- logrotate linux 系统日志备份压缩工具
- logrotate linux 系统日志备份压缩工具
- Linux日志处理:Logrotate
- linux 日志切割logrotate
- Linux 日志管理 Logrotate
- Redhat安装与日志备份logrotate
- linux日志回滚---logrotate
- linux log 日志轮转 logrotate
- Linux日志文件总管logrotate
- Linux日志文件分割(Logrotate)
- linux 利用 logrotate 管理日志
- Linux日志文件管理-logrotate
- linux日志转储:logrotate
- linux logrotate 日志切割管理
- logrotate--Linux日志文件总管
- 使用logrotate 管理日志文件 (Linux相关)
- Linux下使用logrotate实现日志切换
- struts2的java.lang.NoSuchMethodException异常处理
- shell流程中for、while、until介绍
- dagger2结合apt自动生成注入代码搭建mvp
- Linux crontab定时执行任务 命令格式与详细例子
- android面试集锦总结二
- linux logrotate备份日志
- Linux-鸟菜-6-文件与目录管理
- Linux DNS查看以及dig命令使用
- flume事务解析
- 常用文本控件
- HTML5 本地存储 localStorage、sessionStorage 的遍历、存储大小限制处理
- CSS小白入门笔记(1)
- 守护进程
- JS用for循环调用函数小例子