0

I am not very familiar with unix terminologies but I have a requirement where I have installed Gitlab on one of my RHEL server. By default the installation and log goes to /var/opt/gitlaband /var/log/gitlab respectively.

Gitlab doesn't recommend to change but as my application will grow this mount will become full. I have got another mound created /app/gitlab which has around 200GB of space and I want to move those log files here.

Is there a way to do this without breaking anything? Can we use symlink here? Let me know if anyone can guide me here.

1 Answers1

0

You can either use:

mv /var/log/gitlab/* /app/gitlab/
rm -rf /var/log/gitlab
ln -s /app/gitlab /var/log/gitlab

or

mv /var/log/gitlab/* /app/gitlab/
mount --bind /app/gitlab /var/log/gitlab

in mount case you have to add this to fstab too.

kab00m
  • 398
  • 1
  • 9
  • Thank you for the response BUT if i move ```mv /var/log/gitlab/* /app/gitlab/``` then wouldn't my gitlab configuration breaks when i reconfigure or restart it again because in gitlab configuration all the directories are set to ```/var/log/gitlab```. ? – mikita agrawal Oct 30 '20 at 15:12
  • The symlink points to real Gitlab location, and old paths work transparently. – Tero Kilkanen Oct 30 '20 at 22:07