bartAV
September 28, 2020, 9:38am
1
Hello,
I’m running bitwarden rs in a docker on an Ubuntu server.
I would like to setup logrotate on the /bwdate/bitwarden.log file.
Does anyone has a suggestion for the right logrotate.d file content?
Edit:
I just found this:
/etc/logrotate.d/bitwarden :
/var/log/bitwarden/bitwarden.log
{
rotate 52
dateext
weekly
missingok
notifempty
compress
sharedscripts
postrotate
invoke-rc.d rsyslog rotate > /dev/null
endscript
}
Does this work on Ubuntu server? I’m in doupt about the postrotate part.
I would use copytruncate
and you can remove the invoke-rc.d
line.
bartAV
September 28, 2020, 8:53pm
3
Okay, so it would look like this:
/var/log/bitwarden/bitwarden.log
{
rotate 52
copytruncate
dateext
weekly
missingok
notifempty
compress
sharedscripts
endscript
}
I have this for my logroate.
{
rotate 31
daily
missingok
notifempty
copytruncate
compress
}
I think you should also remove the sharedscripts
and endscript
at least.
1 Like
bartAV
October 6, 2020, 5:51pm
5
Thank you BlackDex! I’ll try that out.