Skip to content

Instantly share code, notes, and snippets.

@the-teacher
Created March 12, 2016 15:25
Show Gist options
  • Save the-teacher/83546f8fd3ea179462ae to your computer and use it in GitHub Desktop.
Save the-teacher/83546f8fd3ea179462ae to your computer and use it in GitHub Desktop.
Log Rotate
# which logrotate
/usr/sbin/logrotate
# logrotate -v
logrotate 3.8.1 - Copyright (C) 1995-2001 Red Hat, Inc.
@the-teacher
Copy link
Author

/usr/sbin/logrotate -dfv /var/www/open_cook_web/data/www/zykin_ilya_web/new-open-cook.ru/current/log/open-cook.ru-acc/logrot.conf
-s /var/www/open_cook_web/data/www/zykin_ilya_web/new-open-cook.ru/current/log/open-cook.ru-acc/logrotate.status.log
chmod 644 /var/www/open_cook_web/data/www/zykin_ilya_web/new-open-cook.ru/current/log/logrot.conf
chown root:root /var/www/open_cook_web/data/www/zykin_ilya_web/new-open-cook.ru/current/log/logrot.conf
logrotate -dfv /var/www/open_cook_web/data/www/zykin_ilya_web/new-open-cook.ru/current/log/logrot.conf
/var/www/open_cook_web/data/www/zykin_ilya_web/new-open-cook.ru/current/log/searchd.log {
  rotate 5
  size=1M
  missingok
  nocopytruncate
  nodelaycompress
  create 644 open_cook_web open_cook_web
  nocreate
  nomail
  notifempty
  noolddir
  nocompress
}

/var/www/open_cook_web/data/www/zykin_ilya_web/new-open-cook.ru/current/log/production.log {
  rotate 5
  size=1M
  create 644 open_cook_web open_cook_web
  missingok
  nocopytruncate
  nodelaycompress
  nocreate
  nomail
  notifempty
  noolddir
  nocompress
}

/var/www/open_cook_web/data/www/zykin_ilya_web/new-open-cook.ru/current/log/open-cook.ru-acc {
  rotate 5
  size=1M
  missingok
  nocopytruncate
  nodelaycompress
  create 644 www-data root
  nocreate
  nomail
  notifempty
  noolddir
  nocompress
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment