1

I have a local gitlab installation, where in these 2 files production.log and sidekiq.log are taking too much space. Just wondering is it safe to delete them

Brij Raj Singh - MSFT
  • 4,903
  • 7
  • 36
  • 55

1 Answers1

1

Yes, but it is best to:

  • stop the services first
  • delete them in gitlab/log
  • restart

You can also activate the logrotate settings added between 6.1 and 6.2, to help manage the compression and rotation of those logs.

# Add support for lograte for better log file handling
sudo apt-get install logrotate

The latest 6.2 GitLab includes a:

lib/support/logrotate/gitlab:

# GitLab logrotate settings
# based on: http://stackoverflow.com/a/4883967

/home/git/gitlab/log/*.log {
    weekly
    missingok
    rotate 52
    compress
    delaycompress
    notifempty
    copytruncate
}

/home/git/gitlab-shell/gitlab-shell.log {
    weekly
    missingok
    rotate 52
    compress
    delaycompress
    notifempty
    copytruncate
}
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • thanks @VonC I was able to delete, but seems like I won't be able to manage with this much space, can you also tell me how could i move the gitlab installation to another disk, I was able to lay my hands on another disk and added it to my ubuntu machine. – Brij Raj Singh - MSFT Nov 08 '13 at 12:02
  • @BrijRajSingh Simply redo the installation and move your "`repositories`" folder from one machine to the other (or make a symlink from your new gitlab folder "`repositories`" to your current "`repositories`". – VonC Nov 08 '13 at 12:17
  • @BrijRajSingh note that also you can configure logrotate to compress and rotate your logs in any path you want, effectively moving the older logs elsewhere. – VonC Nov 08 '13 at 12:18
  • actually i just want to move the entire gitlab installation to another directory, just like that, I am not sure how a symlink would help me – Brij Raj Singh - MSFT Nov 08 '13 at 12:57
  • @BrijRajSingh I wouldn't recommend a move. A symlink is only for the git repos stored in the `repositories` folder. – VonC Nov 08 '13 at 13:23