Shell script with crontabs

venkateswarlu August 14, 2019

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

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 14, 2019

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.

venkateswarlu August 14, 2019

Hi Nic Brough,

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

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 14, 2019

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)

venkateswarlu August 14, 2019

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
TAGS
AUG Leaders

Atlassian Community Events