I didn’t recognize that Seafile settings for Logrotate don’t rotate the logs for seafdav or seaf-fuse (for example).
Here is a list of settings for all log files under seafile/logs
:
Logrotate settings for Seafile server
This tutorial is an idea for improving https://manual.seafile.com/deploy/using_logrotate.html.
touch /etc/logrotate.d/seafile
To add (additional) settings for logrotate paste or append in /etc/logrotate.d/seafile
for…
…ccnet.log
/srv/seafile/logs/ccnet.log
{
daily
missingok
rotate 52
compress
delaycompress
notifempty
sharedscripts
postrotate
[ ! -f /srv/seafile/pids/ccnet.pid ] || kill -USR1 `cat /srv/seafile/pids/ccnet.pid`
endscript
}
…controller.log (not in official manual)
/srv/seafile/logs/controller.log
{
daily
missingok
rotate 24
compress
delaycompress
notifempty
sharedscripts
}
…seafdav.log (not in official manual)
/srv/seafile/logs/seafdav.log
{
daily
missingok
rotate 24
compress
delaycompress
notifempty
sharedscripts
}
…seaf-fuse.log (not in official manual)
/srv/seafile/logs/seaf-fuse.log.log
{
monthly
missingok
rotate 24
compress
delaycompress
notifempty
sharedscripts
}
…seafile.init.log
/srv/seafile/logs/seafile.init.log
{
monthly
missingok
rotate 24
compress
delaycompress
notifempty
sharedscripts
}
…seafile.log (not in official manual)
/srv/seafile/logs/seafile.log
{
daily
missingok
rotate 24
compress
delaycompress
notifempty
sharedscripts
}
…seaf-server.log
/srv/seafile/logs/seaf-server.log
{
daily
missingok
rotate 52
compress
delaycompress
notifempty
sharedscripts
postrotate
[ ! -f /srv/seafile/pids/seaf-server.pid ] || kill -USR1 `cat /srv/seafile/pids/seaf-server.pid`
endscript
}
…seahub_django_request.log (not in official manual)
/srv/seafile/logs/seahub_django_request.log
{
monthly
missingok
rotate 24
compress
delaycompress
notifempty
sharedscripts
}
…seahub.init.log
/srv/seafile/logs/seahub.init.log
{
monthly
missingok
rotate 24
compress
delaycompress
notifempty
sharedscripts
}
…seahub.log (not in official manual)
/srv/seafile/logs/seahub.log
{
monthly
missingok
rotate 24
compress
delaycompress
notifempty
sharedscripts
}
meanings (examples)
Based on: http://www.linuxcommand.org/man_pages/logrotate8.html
daily
Log files are rotated every day.
monthly
Log files are rotated the first time logrotate is run in a month (this is normally on the first day of the month).
rotate X
Log files are rotated X times before being removed or mailed to the address specified in a mail directive. If X is 0, old versions are removed rather then rotated.
backup of original /etc/logrotate.d/seafile
/srv/seafile/logs/seaf-server.log
{
daily
missingok
rotate 52
compress
delaycompress
notifempty
sharedscripts
postrotate
[ ! -f /srv/seafile/pids/seaf-server.pid ] || kill -USR1 `cat /srv/seafile/pids/seaf-server.pid`
endscript
}
/srv/seafile/logs/ccnet.log
{
daily
missingok
rotate 52
compress
delaycompress
notifempty
sharedscripts
postrotate
[ ! -f /srv/seafile/pids/ccnet.pid ] || kill -USR1 `cat /srv/seafile/pids/ccnet.pid`
endscript
}
/srv/seafile/logs/seafile.init.log
{
monthly
missingok
rotate 24
compress
delaycompress
notifempty
sharedscripts
}
/srv/seafile/logs/seahub.init.log
{
monthly
missingok
rotate 24
compress
delaycompress
notifempty
sharedscripts
}