一个伪linux粉丝的blog

  1. 首页
  2. unix/linux
  3. 正文

crontab log error

21 2 月, 2011 2624点热度 0人点赞 0条评论

上午看服务器apache日志,有2个多G,才发现有1个多月没有logrotate了,难怪这么大。

手动运行logrotate命令,报错 error: bad top line in state file /var/lib/logrotate.status

谷歌了一下,解决方法如下

1> Take a back up of the logrotate.status file.
mv /var/lib/logrotate/status /var/lib/logrotate/status.bak

2> Run to logrotate sommand manually to regenerate this file again
logrotate -fv /etc/logrotate.conf

重新排列日志的日期并将日志文件逐个改名,终端看到类似输出结果

renaming /var/log/apache2/access.log.29.gz to /var/log/apache2/access.log.30.gz (rotatecount 540, logstart 1, i 30)

logrotate 搞定

相关文章:

  1. my vps is reachable over IPv6
  2. Log analysis felt the power of ddos attack
  3. MySQL配置文件说明-转
  4. 安装Nginx
标签: 暂无
最后更新:21 2 月, 2011

wanjie

这个人很懒,什么都没留下

点赞
< 上一篇
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

This site uses Akismet to reduce spam. Learn how your comment data is processed.

归档
分类
  • network / 332篇
  • Uncategorized / 116篇
  • unix/linux / 123篇
  • 业界资讯 / 38篇
  • 公司杂事 / 11篇
  • 数码影像 / 14篇
  • 美剧 / 3篇
  • 美图共赏 / 21篇
  • 英语学习 / 3篇
标签聚合
deepseek squid Linux 浏览器 kubectl debian dreamhost空间 docker webhook d90 gitlab 邮件归档 泰国 wget kernel VPS 虚拟主机 Ubuntu Opera Mini k8s openssl dreamhost Nginx Google 网站运营 nexus ldap 刷机 纵贯线 Google Voice

COPYRIGHT © 2008-2025 wanjie.info. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang