Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,369,237
Community Members
 
Community Events
168
Community Groups

Shell script with crontabs

We are using JIRA in LINUX environment and we are working on to wtite shell scripts with shedular times. we need a clear explination on these following requests.

1.Deleting old log files – logs that are older than 90 days on Jira server.

2. Recovering disk space are

  • Jira home /log
  • Jira home /export
  • Jira install /temp
  • Jira install /work
  • Jira install /log

1 comment

I would recommend using logrotate instead of a shell script - the configuration is more simple, it's a standard Linux utility and it's almost certainly already in use on your system for cleaning system log files

I would also drop "work" from that list, as destroying files in there while Jira is running can cripple your system (and you shouldn't need to), and limiting the scope of what you delete in "temp" to older image files too.

Hi Nic Brough,

Can you please give more information on logrotate with sample examples.

I usually work from https://wiki.archlinux.org/index.php/Logrotate but it is a little dry and short of examples, a better one with sample configs that are a good starter (but older) is at https://www.digitalocean.com/community/tutorials/how-to-manage-logfiles-with-logrotate-on-ubuntu-16-04

Note that both contain a lot of installation stuff.  Try "logrotate --version" first - if that returns a version, you can skip reading most of the installation stuff, as you already have it (a lot of Linux distros install it by default)

Hi Nic Brough,

Thank you so much for your quick responce.

I'm very new this configuration so I want to share my system and setup for once a while then its makes me more comfortable on this issue.

Comment

Log in or Sign up to comment