Log removal /retension

I have seen many logs in my onpremis gitlab like this:

/var/log/gitlab/gitlab-rails/production.log
/var/log/gitlab/gitlab-rails/sidekiq.log
/var/log/gitlab/nginx/gitlab_access.log
/var/log/gitlab/nginx/gitlab_error.log
/var/log/gitlab/gitlab-shell/gitlab-shell.log

Inside the above directlores,many log entries were seen with .log.18,19,20,21 etc dated 1months old two months old etc
do we need to manually delete these or are there any settings in gitlab.rb to do this?
could any one help?

Log rotation happens on it’s own. These files go up to .log.30.gz. After 30 they are deleted automatically.

3 Likes

Thanks for clearing that up, it makes much more sense now.

Hi!
Check this out:

You can configure logrotate on your Self-Managed instance.

2 Likes