Discussion:
Rotation on Backup Service
Ross Greinke
2004-12-09 21:29:45 UTC
Permalink
I can't find a setting to rotate the logs that are created by the Backup
Service.
Should I just set up a logrotate entry myself? (Luckily, we're running
on Linux.)

Ross Greinke
Anton Mazkovoi
2004-12-13 07:26:33 UTC
Permalink
Hi,

JIRA's backup service exports the database data to XML format into a
specified backup directory. It does not create any logs as such, that
need to be rotated.

Are you referring to rotating your application server's (e.g. Tomcat's)
logs? if so, you can use logrotate. Just copy and truncate the log (use
the 'copytruncate' option) rather than move away the file, so that JIRA
can still use it.

Please let us know if you have any other questions.

Thanks,
Anton
Post by Ross Greinke
I can't find a setting to rotate the logs that are created by the
Backup Service.
Should I just set up a logrotate entry myself? (Luckily, we're
running on Linux.)
Ross Greinke
--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
JIRA-User details available at:
http://www.atlassian.com/software/jira/mailinglist.jsp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ross Greinke
2004-12-13 15:57:39 UTC
Permalink
I understand that the backup service exports the database into zip
files, but it does so without bound. Every backup since the system was
installed is still in there. That directory gets backed up every night,
so I don't necessarily need to have (for example) last September's data
file around any longer. It has been backed up 90 times! I don't care
about that data anymore anyway, it's stale.

I guess I'm looking for a simple rotation mechanism that lets me age and
delete files after some period of time. The logrotate command looks for
a particular file name and creates aged files with an extension. Each
backup database zip file has a different name. Can logrotate handle
files like that?

Thanks for the input,

Ross


-----Original Message-----
From: owner-jira-***@lists.atlassian.com
[mailto:owner-jira-***@lists.atlassian.com] On Behalf Of Anton Mazkovoi
Sent: Monday, December 13, 2004 1:27 AM
To: jira-***@lists.atlassian.com
Subject: Re: [JIRA-user] Rotation on Backup Service

Hi,

JIRA's backup service exports the database data to XML format into a
specified backup directory. It does not create any logs as such, that
need to be rotated.

Are you referring to rotating your application server's (e.g. Tomcat's)
logs? if so, you can use logrotate. Just copy and truncate the log (use
the 'copytruncate' option) rather than move away the file, so that JIRA
can still use it.

Please let us know if you have any other questions.

Thanks,
Anton
Post by Ross Greinke
I can't find a setting to rotate the logs that are created by the
Backup Service.
Should I just set up a logrotate entry myself? (Luckily, we're
running on Linux.)
Ross Greinke
--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
JIRA-User details available at:
http://www.atlassian.com/software/jira/mailinglist.jsp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
JIRA-User details available at:
http://www.atlassian.com/software/jira/mailinglist.jsp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Anton Mazkovoi
2004-12-14 05:48:43 UTC
Permalink
Hi,

I believe the best alternative is to write a script that would delete
old backup files. The script can be something like:

find <backup dir> -name "backup*.zip" -type f -mtime +35 -exec rm -f {}
\;

The "+35" will find only files that are more than 35 days old.

You can then use cron to run the script as regularly as you wish.

Hope this helps.

Thanks,
Anton
Post by Ross Greinke
I understand that the backup service exports the database into zip
files, but it does so without bound. Every backup since the system was
installed is still in there. That directory gets backed up every night,
so I don't necessarily need to have (for example) last September's data
file around any longer. It has been backed up 90 times! I don't care
about that data anymore anyway, it's stale.
I guess I'm looking for a simple rotation mechanism that lets me age and
delete files after some period of time. The logrotate command looks for
a particular file name and creates aged files with an extension. Each
backup database zip file has a different name. Can logrotate handle
files like that?
Thanks for the input,
Ross
-----Original Message-----
Sent: Monday, December 13, 2004 1:27 AM
Subject: Re: [JIRA-user] Rotation on Backup Service
Hi,
JIRA's backup service exports the database data to XML format into a
specified backup directory. It does not create any logs as such, that
need to be rotated.
Are you referring to rotating your application server's (e.g. Tomcat's)
logs? if so, you can use logrotate. Just copy and truncate the log (use
the 'copytruncate' option) rather than move away the file, so that JIRA
can still use it.
Please let us know if you have any other questions.
Thanks,
Anton
Post by Ross Greinke
I can't find a setting to rotate the logs that are created by the
Backup Service.
Should I just set up a logrotate entry myself? (Luckily, we're
running on Linux.)
Ross Greinke
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://www.atlassian.com/software/jira/mailinglist.jsp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://www.atlassian.com/software/jira/mailinglist.jsp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
JIRA-User details available at:
http://www.atlassian.com/software/jira/mailinglist.jsp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

L***@ppi.de
2004-12-13 16:20:44 UTC
Permalink
If you are on Unix you can set up a cronjob that does something like (from
memory)

/usr/bin/find your_backup_directory -ctime +20 -exec rm {} \;

That command should delete all files older than 20 days in the backup
directory. As always, please test this before doing it on your production
data!

Lars
Post by Ross Greinke
-----Original Message-----
From: Ross Greinke
[...]
I guess I'm looking for a simple rotation mechanism that lets
me age and delete files after some period of time.
The logrotate command looks for
a particular file name and creates aged files with an extension. Each
backup database zip file has a different name. Can logrotate handle
files like that?
--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
JIRA-User details available at:
http://www.atlassian.com/software/jira/mailinglist.jsp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Loading...